FAQ | This is a LIVE service | Changelog

Skip to content
Commits on Source (4)
......@@ -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).
## [4.6.0] - 2024-09-24
### Added
- `multi-target-docker-images.gitlab-ci.yml`: a new template added to the common
pipeline which allows building multiple docker images for different targets.
## [4.5.1] - 2024-09-19
### Fixed
......
spec:
inputs:
docker_build_targets:
type: array
default: []
---
# This template allows for building and publishing multi target Docker images.
# It can be used by including this template alongside the other AutoDevOps templates
# and passing the `docker_build_targets` as an array:
#
# include:
# - project: "uis/devops/continuous-delivery/ci-templates"
# file: "/auto-devops/multi-target-docker-images.gitlab-ci.yml"
# inputs:
# docker_build_targets: ["stage1", "stage2"]
#
# Note that this will disable the build for the final stage (if not specified in
# `docker_build_targets` explicitly). In order to re-enable this add the following
# to your variables:
#
# variables:
# # Override variables set by the multi target docker images template, as we do want to build the
# # final stage but we don't want to explicitly tag it with the final stage name
# BUILD_DISABLED: ""
# CONTAINER_SCANNING_DISABLED: ""
# DISABLE_ARTIFACT_REGISTRY_PUSH: ""
variables:
# Disable Auto DevOps jobs which should actually run in child pipelines.
BUILD_DISABLED: "1"
CONTAINER_SCANNING_DISABLED: "1"
DISABLE_ARTIFACT_REGISTRY_PUSH: "1"
# Disabled Auto DevOps jobs which do not need to be duplicated in multi-image child pipelines.
DEPENDENCY_SCANNING_DISABLED: $MULTI_DOCKER_IMAGE_BUILD_ENABLED
SAST_DISABLED: $MULTI_DOCKER_IMAGE_BUILD_ENABLED
PRE_COMMIT_DISABLED: $MULTI_DOCKER_IMAGE_BUILD_ENABLED
multiple-docker-images:
stage: build
needs: []
trigger:
include: .gitlab-ci.yml
strategy: depend
variables:
# Set a flag so that downstream pipelines and jobs are aware when they're running in a
# 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: ""
DISABLE_ARTIFACT_REGISTRY_PUSH: ""
# The following jobs should be run in the main pipeline.
DEPENDENCY_SCANNING_DISABLED: "1"
SAST_DISABLED: "1"
PRE_COMMIT_DISABLED: "1"
CODE_QUALITY_DISABLED: "1"
SECRET_DETECTION_DISABLED: "1"
parallel:
matrix:
- DOCKER_BUILD_TARGET: $[[ inputs.docker_build_targets ]]
AUTO_DEVOPS_BUILD_IMAGE_EXTRA_ARGS: "--target $DOCKER_BUILD_TARGET"
rules:
- if: $MULTI_DOCKER_IMAGE_BUILD_ENABLED
when: never
- if: $CI_PIPELINE_SOURCE != "parent_pipeline"