From 8ababcdf2687b40e5b56c64344158dfcd60f6f8b Mon Sep 17 00:00:00 2001 From: Vincenzo De Naro Papa Date: Thu, 24 Sep 2020 12:11:34 +0200 Subject: [PATCH] Fix #2222 by adding LAGOON_ENVIRONMENT variable --- images/oc-build-deploy-dind/build-deploy-docker-compose.sh | 1 + images/oc-build-deploy-dind/openshift-templates/configmap.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/images/oc-build-deploy-dind/build-deploy-docker-compose.sh b/images/oc-build-deploy-dind/build-deploy-docker-compose.sh index 5bf87cce20..60cd1d5033 100755 --- a/images/oc-build-deploy-dind/build-deploy-docker-compose.sh +++ b/images/oc-build-deploy-dind/build-deploy-docker-compose.sh @@ -331,6 +331,7 @@ if [[ ( "$TYPE" == "pullrequest" || "$TYPE" == "branch" ) && ! $THIS_IS_TUG == BUILD_ARGS+=(--build-arg LAGOON_GIT_BRANCH="${BRANCH}") BUILD_ARGS+=(--build-arg LAGOON_GIT_SAFE_BRANCH="${SAFE_BRANCH}") BUILD_ARGS+=(--build-arg LAGOON_PROJECT="${PROJECT}") + BUILD_ARGS+=(--build-arg LAGOON_ENVIRONMENT="${SAFE_BRANCH}") BUILD_ARGS+=(--build-arg LAGOON_SAFE_PROJECT="${SAFE_PROJECT}") BUILD_ARGS+=(--build-arg LAGOON_BUILD_TYPE="${TYPE}") BUILD_ARGS+=(--build-arg LAGOON_GIT_SOURCE_REPOSITORY="${SOURCE_REPOSITORY}") diff --git a/images/oc-build-deploy-dind/openshift-templates/configmap.yml b/images/oc-build-deploy-dind/openshift-templates/configmap.yml index b7c060e664..ba591d01c5 100644 --- a/images/oc-build-deploy-dind/openshift-templates/configmap.yml +++ b/images/oc-build-deploy-dind/openshift-templates/configmap.yml @@ -52,6 +52,7 @@ objects: LAGOON_GIT_BRANCH: ${BRANCH} LAGOON_SAFE_PROJECT: ${SAFE_PROJECT} LAGOON_PROJECT: ${PROJECT} + LAGOON_ENVIRONMENT: ${SAFE_BRANCH} LAGOON_ENVIRONMENT_TYPE: ${ENVIRONMENT_TYPE} LAGOON_ROUTE: ${ROUTE} LAGOON_ROUTES: ${ROUTES}