FAQ | This is a LIVE service | Changelog

Skip to content
Commits on Source (2)
......@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [6.0.4] - 2024-11-08
### Fixed
- Fixed `multi-target-docker-images` container naming discussed in
https://gitlab.developers.cam.ac.uk/uis/devops/iam/authentication/shibboleth/attributes-proxy/-/merge_requests/22#note_736265
## [6.0.3] - 2024-11-06
### Fixed
......
......@@ -27,13 +27,16 @@ spec:
# DISABLE_ARTIFACT_REGISTRY_PUSH: ""
include:
- local: "/fragments/multi-target-docker-images.gitlab-ci.yml"
- local: "/fragments/multi-target-docker-images/multiple-docker-images.gitlab-ci.yml"
inputs:
docker_build_targets: $[[ inputs.docker_build_targets ]]
rules:
- if: $MULTI_DOCKER_IMAGE_BUILD_ENABLED
when: never
- if: $CI_PIPELINE_SOURCE != "parent_pipeline"
- local: "/fragments/multi-target-docker-images/build.gitlab-ci.yml"
rules:
- if: $MULTI_DOCKER_IMAGE_BUILD_ENABLED && $CI_PIPELINE_SOURCE == "parent_pipeline"
variables:
# Disabled Auto DevOps jobs which do not need to be duplicated in multi-image child pipelines.
......
# We need to change the `CI_APPLICATION_REPOSITORY` and `CI_ARTIFACT_REGISTRY_REPOSITORY` to
# include `DOCKER_BUILD_TARGET`. We can't do this as part of multiple-docker-images:variables
# because the outcome of the variables is conditional based on the existance of `CI_COMMIT_TAG`.
# So we set this in the child pipeline.
build:
before_script:
- |
# This is adapted from the Auto-DevOps Build job to ensure we're working on the same image!
# See https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Jobs/Build.gitlab-ci.yml
if [[ -z "$CI_COMMIT_TAG" ]]; then
export CI_APPLICATION_REPOSITORY=${CI_APPLICATION_REPOSITORY:-$CI_REGISTRY_IMAGE/$DOCKER_BUILD_TARGET/$CI_COMMIT_REF_SLUG}
export CI_ARTIFACT_REGISTRY_REPOSITORY=$ARTIFACT_REGISTRY_DOCKER_REPOSITORY/${ARTIFACT_REGISTRY_IMAGE_NAME:-$CI_PROJECT_NAME/$DOCKER_BUILD_TARGET/$CI_COMMIT_REF_SLUG}
else
export CI_APPLICATION_REPOSITORY=${CI_APPLICATION_REPOSITORY:-$CI_REGISTRY_IMAGE/$DOCKER_BUILD_TARGET}
export CI_ARTIFACT_REGISTRY_REPOSITORY=$ARTIFACT_REGISTRY_DOCKER_REPOSITORY/${ARTIFACT_REGISTRY_IMAGE_NAME:-$CI_PROJECT_NAME/$DOCKER_BUILD_TARGET}
fi
echo "CI_APPLICATION_REPOSITORY=$CI_APPLICATION_REPOSITORY" >> gl-auto-build-variables.env
echo "CI_ARTIFACT_REGISTRY_REPOSITORY=$CI_ARTIFACT_REGISTRY_REPOSITORY" >> gl-auto-build-variables.env
......@@ -22,10 +22,6 @@ multiple-docker-images:
# multi-image build.
MULTI_DOCKER_IMAGE_BUILD_ENABLED: "1"
# Override the docker image name used for GitLab and GCP artifact registry push.
CI_APPLICATION_REPOSITORY: "$CI_REGISTRY_IMAGE/$DOCKER_BUILD_TARGET"
CI_ARTIFACT_REGISTRY_REPOSITORY: "$CI_ARTIFACT_REGISTRY_REPOSITORY/$DOCKER_BUILD_TARGET"
# Re-enabled build, container scanning and docker image push jobs.
BUILD_DISABLED: ""
CONTAINER_SCANNING_DISABLED: ""
......