summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-11-15 17:27:08 +0000
committerRémy Coutable <remy@rymai.me>2018-11-15 17:27:08 +0000
commit97e3d5ce292d056a9dd15e16823b9570832db02a (patch)
tree60ae4aff05167f0983a52d95c89383400efb557e
parent42df618bbbec70d45b8e04a4aafa87cca9d5d742 (diff)
parent553eaf01f7f299842d0985325e11ff8f58ef9c03 (diff)
downloadgitlab-ce-97e3d5ce292d056a9dd15e16823b9570832db02a.tar.gz
Merge branch 'conditionally-build-assets-image' into 'master'
Add BUILD_ASSETS_IMAGE CI variable See merge request gitlab-org/gitlab-ce!23076
-rw-r--r--.gitlab-ci.yml1
-rwxr-xr-xscripts/build_assets_image6
2 files changed, 7 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 82d2cb8d09f..b7f18673a58 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -32,6 +32,7 @@ variables:
GET_SOURCES_ATTEMPTS: "3"
KNAPSACK_RSPEC_SUITE_REPORT_PATH: knapsack/${CI_PROJECT_NAME}/rspec_report-master.json
FLAKY_RSPEC_SUITE_REPORT_PATH: rspec_flaky/report-suite.json
+ BUILD_ASSETS_IMAGE: "false"
before_script:
- bundle --version
diff --git a/scripts/build_assets_image b/scripts/build_assets_image
index 1d77524d503..4e5ef977161 100755
--- a/scripts/build_assets_image
+++ b/scripts/build_assets_image
@@ -1,5 +1,11 @@
#!/bin/bash
+# Exit early if we don't want to build the image
+if [[ "${BUILD_ASSETS_IMAGE}" != "true" ]]
+then
+ exit 0
+fi
+
# Generate the image name based on the project this is being run in
ASSETS_IMAGE_NAME=$(echo ${CI_PROJECT_NAME} |
awk '{