From 725f9e3449526e3a88a38dca9ef9b5ee64e4ba50 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Fri, 7 May 2021 00:33:43 +0530 Subject: Use correct environment variables for mapbox based on git branch --- .gitlab-ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index da31bd1..05e73ec 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,11 @@ stages: - build - test +# By default load dev keys. +variables: + MAPBOX_KEY: $MAPBOX_KEY_DEV + MAPBOX_SECRET_KEY: $MAPBOX_SECRET_KEY_DEV + workflow: rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' @@ -85,6 +90,9 @@ build-full: - if: '$CI_PIPELINE_SOURCE == "schedule"' when: never - if: '$CI_COMMIT_BRANCH == "master"' + variables: + MAPBOX_KEY: $MAPBOX_KEY_PROD + MAPBOX_SECRET_KEY: $MAPBOX_SECRET_KEY_PROD when: always - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"' when: always -- cgit v1.2.1