]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1406239 - Pass CircleCI Environmental variables to docker build process
authorDylan William Hardison <dylan@hardison.net>
Fri, 6 Oct 2017 22:14:56 +0000 (18:14 -0400)
committerGitHub <noreply@github.com>
Fri, 6 Oct 2017 22:14:56 +0000 (18:14 -0400)
.circleci/config.yml
Dockerfile

index de289a3c5bd1d8d870541e89a891f8aac14df39e..f13b10a58db45350d566acf0cb4db10584792781 100644 (file)
@@ -70,7 +70,12 @@ jobs:
           name: install git and ssh
           command: apk update && apk add git openssh-client
       - checkout
-      - run: docker build -t bmo .
+      - run: |
+          docker build \
+            --build-arg CI="$CI" \
+            --build-arg CIRCLE_SHA1="$CIRCLE_SHA1" \
+            --build-arg CIRCLE_BUILD_NUM="$CIRCLE_BUILD_NUM" \
+            -t bmo .
       - deploy:
           command: |
             docker build -t bmo .
index 604f12c14264a39963bb6de067c416788be51d11..4a387f1a2f3f0d878070c87c173eec9f14e54898 100644 (file)
@@ -1,5 +1,13 @@
 FROM mozillabteam/bmo-slim:20170927.1
 
+ARG CI
+ARG CIRCLE_SHA1
+ARG CIRCLE_BUILD_NUM
+
+ENV CI=${CI}
+ENV CIRCLE_BUILD_NUM=${CIRCLE_BUILD_NUM}
+ENV CIRCLE_SHA1=${CIRCLE_SHA1}
+
 ENV HTTPD_StartServers=8
 ENV HTTPD_MinSpareServers=5
 ENV HTTPD_MaxSpareServers=20