diff --git a/Makefile b/Makefile index 2f372144c847..87e86c929f46 100644 --- a/Makefile +++ b/Makefile @@ -316,14 +316,14 @@ $(VERSION_FILE): touch $(VERSION_FILE) dist/postgres.yaml: $(MANIFESTS) $(E2E_MANIFESTS) $(VERSION_FILE) - kustomize build --load_restrictor=none test/e2e/manifests/postgres | sed 's/:$(MANIFESTS_VERSION)/:$(VERSION)/' | sed 's/pns/$(E2E_EXECUTOR)/' > dist/postgres.yaml + kustomize build --load_restrictor=none test/e2e/manifests/postgres | sed 's/:$(MANIFESTS_VERSION)/:$(VERSION)/' | sed 's/:E2E_TAG/:$(VERSION)/' | sed 's/pns/$(E2E_EXECUTOR)/' > dist/postgres.yaml dist/no-db.yaml: $(MANIFESTS) $(E2E_MANIFESTS) $(VERSION_FILE) # We additionally disable ALWAYS_OFFLOAD_NODE_STATUS - kustomize build --load_restrictor=none test/e2e/manifests/no-db | sed 's/:$(MANIFESTS_VERSION)/:$(VERSION)/' | sed 's/pns/$(E2E_EXECUTOR)/' | sed 's/"true"/"false"/' > dist/no-db.yaml + kustomize build --load_restrictor=none test/e2e/manifests/no-db | sed 's/:$(MANIFESTS_VERSION)/:$(VERSION)/' | sed 's/:E2E_TAG/:$(VERSION)/' | sed 's/pns/$(E2E_EXECUTOR)/' | sed 's/"true"/"false"/' > dist/no-db.yaml dist/mysql.yaml: $(MANIFESTS) $(E2E_MANIFESTS) $(VERSION_FILE) - kustomize build --load_restrictor=none test/e2e/manifests/mysql | sed 's/:$(MANIFESTS_VERSION)/:$(VERSION)/' | sed 's/pns/$(E2E_EXECUTOR)/' > dist/mysql.yaml + kustomize build --load_restrictor=none test/e2e/manifests/mysql | sed 's/:$(MANIFESTS_VERSION)/:$(VERSION)/' | sed 's/:E2E_TAG/:$(VERSION)/' | sed 's/pns/$(E2E_EXECUTOR)/' > dist/mysql.yaml .PHONY: install install: dist/postgres.yaml dist/mysql.yaml dist/no-db.yaml diff --git a/test/e2e/fixtures/e2e_suite.go b/test/e2e/fixtures/e2e_suite.go index 0eaf68def7cd..2e456e0b27ff 100644 --- a/test/e2e/fixtures/e2e_suite.go +++ b/test/e2e/fixtures/e2e_suite.go @@ -40,14 +40,22 @@ var imageTag string var k3d bool func init() { - output, err := runCli("git", "rev-parse", "--abbrev-ref=loose", "HEAD") + gitBranch, err := runCli("git", "rev-parse", "--abbrev-ref=loose", "HEAD") if err != nil { panic(err) } - imageTag = strings.TrimSpace(output) + imageTag = strings.TrimSpace(gitBranch) if imageTag == "master" { imageTag = "latest" } + if strings.HasPrefix(gitBranch, "release-2") { + tags, err := runCli("git", "tag", "--merged") + if err != nil { + panic(err) + } + parts := strings.Split(tags, "\n") + imageTag = parts[len(parts)-2] + } context, err := runCli("kubectl", "config", "current-context") if err != nil { panic(err) diff --git a/test/e2e/manifests/mixins/workflow-controller-deployment.yaml b/test/e2e/manifests/mixins/workflow-controller-deployment.yaml index 70faac5a7872..835dd4c0a65a 100644 --- a/test/e2e/manifests/mixins/workflow-controller-deployment.yaml +++ b/test/e2e/manifests/mixins/workflow-controller-deployment.yaml @@ -10,7 +10,7 @@ spec: imagePullPolicy: Never args: - --executor-image - - argoproj/argoexec:latest + - argoproj/argoexec:E2E_TAG - --namespaced - --loglevel - debug