Browse Source

Use `$CI_COMMIT_SHORT_SHA` for `GIT_REF`

Using `$CI_COMMIT_REF_NAME` means we get `master` for every image build,
which is not very useful/informative. Using `$CI_COMMIT_SHORT_SHA`,
on the other hand, makes it possible to see exactly from which commit an
image was built.
merge-requests/159/head
Daniel Wiesenberg 4 years ago committed by Jonas Zohren
parent
commit
3f766d2a13
  1. 2
      .gitlab-ci.yml

2
.gitlab-ci.yml

@ -218,7 +218,7 @@ build:docker:main: @@ -218,7 +218,7 @@ build:docker:main:
--context $CI_PROJECT_DIR
--build-arg CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
--build-arg VERSION=$(grep -m1 -o '[0-9].[0-9].[0-9]' Cargo.toml)
--build-arg "GIT_REF=$CI_COMMIT_REF_NAME"
--build-arg "GIT_REF=$CI_COMMIT_SHORT_SHA"
--dockerfile "$CI_PROJECT_DIR/docker/ci-binaries-packaging.Dockerfile"
--destination "$CI_REGISTRY_IMAGE/conduit:latest"
--destination "$CI_REGISTRY_IMAGE/conduit:alpine"

Loading…
Cancel
Save