summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml8
-rw-r--r--load-properties.gradle4
2 files changed, 10 insertions, 2 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
diff --git a/load-properties.gradle b/load-properties.gradle
index b8c6844..71c9fb5 100644
--- a/load-properties.gradle
+++ b/load-properties.gradle
@@ -28,6 +28,6 @@ if (localPropertiesFile.exists()) {
new FileInputStream(localPropertiesFile).withCloseable { is -> p.load(is) }
p.each { name, value -> ext[name] = value }
} else {
- ext["MAPBOX_KEY"] = System.getenv('MAPBOX_KEY_DEV')
- ext["MAPBOX_SECRET_KEY"] = System.getenv('MAPBOX_SECRET_KEY_DEV')
+ ext["MAPBOX_KEY"] = System.getenv('MAPBOX_KEY')
+ ext["MAPBOX_SECRET_KEY"] = System.getenv('MAPBOX_SECRET_KEY')
} \ No newline at end of file