FAQ | This is a LIVE service | Changelog

Skip to content

fix: container scanning when using multi target docker images

Sebastiaan ten Pas requested to merge fix-multi-target-docker-images-cs into master

Fixes issues seen as in https://gitlab.developers.cam.ac.uk/uis/devops/iam/authentication/shibboleth/attributes-proxy/-/jobs/1860027

There are two things in this MR:

  1. I noticed that with our current approach, CI_ARTIFACT_REGISTRY_REPOSITORY was actually not present in gl-auto-build-variables.env because https://gitlab.com/gitlab-org/cluster-integration/auto-build-image/-/blob/master/src/build.sh?ref_type=heads#L51 overwrites all content in the file
  2. container_scanning has dependencies set to [] (https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Jobs/Container-Scanning.gitlab-ci.yml#L45), meaning that gl-auto-build-variables.env would not be loaded. We need to overwrite this and explicitly tell it to depend on the build job.

This MR fixes both issues.

Merge request reports

Loading