From 4c30aed481c1e485cebd5ab4ca3a2de9a8eed588 Mon Sep 17 00:00:00 2001 From: Milos Milutinovic Date: Thu, 5 Dec 2019 15:11:35 +0100 Subject: [PATCH] add extra variables to template jobs --- base/docker.yml | 2 ++ mixins/deploy/gcp-k8s-deploy.yml | 2 ++ mixins/test/gcp-k8s-diff.yml | 5 ++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/base/docker.yml b/base/docker.yml index 27fa328..d4e59b6 100644 --- a/base/docker.yml +++ b/base/docker.yml @@ -14,6 +14,8 @@ image: docker:19.03 - docker push $IMAGE_COMMIT .docker_release: + variables: + NEW_IMAGE: NEW_IMAGE script: - docker pull $IMAGE_COMMIT - docker tag $IMAGE_COMMIT $NEW_IMAGE diff --git a/mixins/deploy/gcp-k8s-deploy.yml b/mixins/deploy/gcp-k8s-deploy.yml index 593867e..0e2c966 100644 --- a/mixins/deploy/gcp-k8s-deploy.yml +++ b/mixins/deploy/gcp-k8s-deploy.yml @@ -23,6 +23,8 @@ include: extends: .gcp_k8s_auth stage: deploy variables: + APP: APP_TO_DEPLOY + OVERLAY: OVERLAY_TO_DEPLOY OLD_IMAGE: $CI_REGISTRY_IMAGE NEW_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA script: diff --git a/mixins/test/gcp-k8s-diff.yml b/mixins/test/gcp-k8s-diff.yml index 95e5132..4f151ab 100644 --- a/mixins/test/gcp-k8s-diff.yml +++ b/mixins/test/gcp-k8s-diff.yml @@ -4,7 +4,7 @@ include: # This CI template consists of two parts: # - Auth -# - Diff test +# - K8s test # [[ AUTH ]] - authenticates against a GCP cluster # - ZONE - GCP cluster zone (e.g. us-east1-b) @@ -18,6 +18,9 @@ include: .gcp_k8s_diff: extends: .gcp_k8s_auth + variables: + APP: APP_TO_TEST + OVERLAY: OVERLAY_TO_TEST script: - cd k8s/$APP/overlays/$OVERLAY/ - | -- GitLab