Skip to content

Commit fbfa910

Browse files
committed
Fix app version for images and e2e
1 parent 4302027 commit fbfa910

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

.drone.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,13 @@ pipeline:
4848
- make -s fmt generate manifests
4949
- git diff --exit-code
5050

51-
build-chart:
52-
group: build
53-
image: quay.io/presslabs/bfc:0.4
54-
commands:
55-
- make chart
56-
5751
publish-images:
5852
group: publish
5953
image: quay.io/presslabs/bfc:latest
6054
environment:
6155
DOCKER_HOST: tcp://docker:2375
6256
DOCKER_USER: presslabs+drone
57+
APP_VERSION: ${DRONE_TAG:-${DRONE_BRANCH/master/latest}}
6358
secrets:
6459
- source: QUAY_TOKEN
6560
target: DOCKER_PASSWORD
@@ -71,6 +66,14 @@ pipeline:
7166
- push
7267
- tag
7368

69+
build-chart:
70+
group: build
71+
image: quay.io/presslabs/bfc:0.4
72+
environment:
73+
APP_VERSION: ${DRONE_TAG:-${DRONE_BRANCH/master/latest}}
74+
commands:
75+
- make chart
76+
7477
publish-helm-chart:
7578
image: quay.io/presslabs/kluster-toolbox
7679
pull: true
@@ -138,18 +141,18 @@ pipeline:
138141
secrets:
139142
- GOOGLE_CREDENTIALS
140143
environment:
141-
- APP_VERSION=${DRONE_TAG}
144+
- APP_VERSION=${DRONE_TAG:-${DRONE_BRANCH/master/latest}}
142145
- KUBECONFIG=/root/go/.kube/config
143146
- HELM_HOME=/root/go/.helm/
144147
- CLUSTER_NAME=mysql-op-x${DRONE_BUILD_NUMBER}
145148
- BACKUP_BUCKET_NAME=pl-test-mysql-operator
146149
commands:
147150
- setup-credentials-helper.sh
148151
- go test ./test/e2e -v --kubernetes-config /root/go/.kube/config --kubernetes-context gke_testing-reactor_europe-west3-b_$CLUSTER_NAME
149-
--operator-image quay.io/presslabs/mysql-operator:${DRONE_BRANCH/master/latest}
150-
--sidecar-mysql57-image quay.io/presslabs/mysql-operator-sidecar-mysql57:${DRONE_BRANCH/master/latest}
151-
--sidecar-mysql8-image quay.io/presslabs/mysql-operator-sidecar-mysql8:${DRONE_BRANCH/master/latest}
152-
--orchestrator-image quay.io/presslabs/mysql-operator-orchestrator:${DRONE_BRANCH/master/latest}
152+
--operator-image quay.io/presslabs/mysql-operator:$APP_VERSION
153+
--sidecar-mysql57-image quay.io/presslabs/mysql-operator-sidecar-mysql57:$APP_VERSION
154+
--sidecar-mysql8-image quay.io/presslabs/mysql-operator-sidecar-mysql8:$APP_VERSION
155+
--orchestrator-image quay.io/presslabs/mysql-operator-orchestrator:$APP_VERSION
153156
--pod-wait-timeout 150
154157
--dump-logs-on-failure=false
155158
-timeout 40m

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ORCHESTRATOR_IMAGE_NAME := mysql-operator-orchestrator
55
SIDECAR_MYSQL57_IMAGE_NAME := mysql-operator-sidecar-mysql57
66
SIDECAR_MYSQL8_IMAGE_NAME := mysql-operator-sidecar-mysql8
77
BUILD_TAG := build
8-
IMAGE_TAGS := $(APP_VERSION:master=latest)
8+
IMAGE_TAGS := $(APP_VERSION)
99
PKG_NAME := github.com/presslabs/mysql-operator
1010

1111
BINDIR := $(PWD)/bin
@@ -163,7 +163,7 @@ e2e-local: images
163163
--kubernetes-config $(KUBECONFIG) --kubernetes-context $(K8S_CONTEXT) \
164164
--report-dir ../../e2e-reports
165165

166-
E2E_IMG_TAG ?= latest
166+
E2E_IMG_TAG ?= $(APP_VERSION)
167167
e2e-remote:
168168
go test ./test/e2e -v $(G_ARGS) -timeout 50m --pod-wait-timeout 200 \
169169
-ginkgo.slowSpecThreshold 300 \

0 commit comments

Comments
 (0)