Merge branch 'leipert-fix-missing-build-image-name' into 'master'

Properly tag images when building them

See merge request gitlab-org/gitlab-build-images!466
This commit is contained in:
Rémy Coutable 2021-12-08 15:32:11 +00:00
commit ab474cb8ff
2 changed files with 2 additions and 2 deletions

View file

@ -21,5 +21,5 @@
.build_and_deploy_custom:
extends: .deploy
script:
- ./scripts/custom-docker-build --label "ci_pipeline_url=$CI_PIPELINE_URL" --label "ci_job_url=$CI_JOB_URL" -t "$CI_REGISTRY_IMAGE:$1"
- ./scripts/custom-docker-build --label "ci_pipeline_url=$CI_PIPELINE_URL" --label "ci_job_url=$CI_JOB_URL"
- ./scripts/custom-docker-push

View file

@ -288,7 +288,7 @@ function build_custom_if_needed() {
# This re-uses and builds an existing image if needed
docker pull --quiet "$full_image" || true
docker_command=$(generate_command $@ --cache-from="$full_image_name" )
docker_command=$(generate_command $@ --cache-from="$full_image_name" -t "$full_image_name")
echo "Docker command:"
printf "\t%s" "$docker_command"
eval $docker_command