diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2018-03-23 19:05:36 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2018-03-23 19:05:36 +0300 |
commit | 17b3ff21a79a3e52c6ac11e9d4d1bbd7466a9bbd (patch) | |
tree | c6cc2d9009181315828a5f80a46d7975f72aaf9b | |
parent | e312d62b2f2a4618c8a875054c4676a43084f96c (diff) |
Pass NANOC_ENV and CI_COMMIT_REF_NAME in docker build
-rw-r--r-- | .gitlab-ci.yml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f81246c7..24ffbf86 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -268,7 +268,7 @@ image:docs-stable: NANOC_ENV: 'production' IMAGE_NAME: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME script: - - docker build -t $IMAGE_NAME . + - docker build --build-arg NANOC_ENV=${NANOC_ENV} --build-arg CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME} -t $IMAGE_NAME . - docker push $IMAGE_NAME # Only branches with versions like 10.4 only: @@ -291,7 +291,7 @@ image:docs-archives: <<: *except_stable # -# Build master containing all archives +# Build master containing all archives and latest docs # image:docs-latest: stage: docker-stable @@ -300,7 +300,7 @@ image:docs-latest: NANOC_ENV: 'production' IMAGE_NAME: $CI_REGISTRY_IMAGE:latest script: - - docker build -t $IMAGE_NAME . + - docker build --build-arg NANOC_ENV=${NANOC_ENV} --build-arg CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME} -t $IMAGE_NAME . - docker push $IMAGE_NAME only: - master |