Tag images based on commit SHA, not branch name

Branch name isn't useful for the main use case of rollbacks
This commit is contained in:
Jake Howard 2022-08-26 10:46:33 +01:00
parent c3dac42eb0
commit bf097b9bb7
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -46,7 +46,7 @@ build_container:
services:
- docker:dind
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
DOCKER_BUILDKIT: 1
dependencies: []
stage: test
@ -154,7 +154,7 @@ deploy_container:
services:
- docker:dind
variables:
SRC_IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
SRC_IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
DEST_IMAGE_TAG: $CI_REGISTRY_IMAGE:latest
DOCKER_BUILDKIT: 1
dependencies: []