summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorAmit Kumar <amitkma@e.email>2021-05-07 00:33:43 +0530
committerAmit Kumar <amitkma@e.email>2021-05-07 00:33:43 +0530
commit725f9e3449526e3a88a38dca9ef9b5ee64e4ba50 (patch)
tree0b6ab4fd0b733ef2f7c8d181c9a24ed595eb0ff3 /.gitlab-ci.yml
parentca97c46120b3ce298bfd72bfeb208aa136076ea3 (diff)
Use correct environment variables for mapbox based on git branch
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml8
1 files changed, 8 insertions, 0 deletions
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