Skip to content

Commit

Permalink
Fix app version for images and e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
AMecea committed Feb 16, 2021
1 parent 4302027 commit fbfa910
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
25 changes: 14 additions & 11 deletions .drone.yml
Expand Up @@ -48,18 +48,13 @@ pipeline:
- make -s fmt generate manifests
- git diff --exit-code

build-chart:
group: build
image: quay.io/presslabs/bfc:0.4
commands:
- make chart

publish-images:
group: publish
image: quay.io/presslabs/bfc:latest
environment:
DOCKER_HOST: tcp://docker:2375
DOCKER_USER: presslabs+drone
APP_VERSION: ${DRONE_TAG:-${DRONE_BRANCH/master/latest}}
secrets:
- source: QUAY_TOKEN
target: DOCKER_PASSWORD
Expand All @@ -71,6 +66,14 @@ pipeline:
- push
- tag

build-chart:
group: build
image: quay.io/presslabs/bfc:0.4
environment:
APP_VERSION: ${DRONE_TAG:-${DRONE_BRANCH/master/latest}}
commands:
- make chart

publish-helm-chart:
image: quay.io/presslabs/kluster-toolbox
pull: true
Expand Down Expand Up @@ -138,18 +141,18 @@ pipeline:
secrets:
- GOOGLE_CREDENTIALS
environment:
- APP_VERSION=${DRONE_TAG}
- APP_VERSION=${DRONE_TAG:-${DRONE_BRANCH/master/latest}}
- KUBECONFIG=/root/go/.kube/config
- HELM_HOME=/root/go/.helm/
- CLUSTER_NAME=mysql-op-x${DRONE_BUILD_NUMBER}
- BACKUP_BUCKET_NAME=pl-test-mysql-operator
commands:
- setup-credentials-helper.sh
- go test ./test/e2e -v --kubernetes-config /root/go/.kube/config --kubernetes-context gke_testing-reactor_europe-west3-b_$CLUSTER_NAME
--operator-image quay.io/presslabs/mysql-operator:${DRONE_BRANCH/master/latest}
--sidecar-mysql57-image quay.io/presslabs/mysql-operator-sidecar-mysql57:${DRONE_BRANCH/master/latest}
--sidecar-mysql8-image quay.io/presslabs/mysql-operator-sidecar-mysql8:${DRONE_BRANCH/master/latest}
--orchestrator-image quay.io/presslabs/mysql-operator-orchestrator:${DRONE_BRANCH/master/latest}
--operator-image quay.io/presslabs/mysql-operator:$APP_VERSION
--sidecar-mysql57-image quay.io/presslabs/mysql-operator-sidecar-mysql57:$APP_VERSION
--sidecar-mysql8-image quay.io/presslabs/mysql-operator-sidecar-mysql8:$APP_VERSION
--orchestrator-image quay.io/presslabs/mysql-operator-orchestrator:$APP_VERSION
--pod-wait-timeout 150
--dump-logs-on-failure=false
-timeout 40m
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -5,7 +5,7 @@ ORCHESTRATOR_IMAGE_NAME := mysql-operator-orchestrator
SIDECAR_MYSQL57_IMAGE_NAME := mysql-operator-sidecar-mysql57
SIDECAR_MYSQL8_IMAGE_NAME := mysql-operator-sidecar-mysql8
BUILD_TAG := build
IMAGE_TAGS := $(APP_VERSION:master=latest)
IMAGE_TAGS := $(APP_VERSION)
PKG_NAME := github.com/presslabs/mysql-operator

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

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

0 comments on commit fbfa910

Please sign in to comment.