From 9b1d0076b3f4132c53e56944af1e77a2ec3a0b34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Lajeunesse-Robert?= Date: Thu, 6 Feb 2025 14:42:04 -0500 Subject: [PATCH] Support container dependency proxy for GitLab jobs --- scanner.yml | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/scanner.yml b/scanner.yml index 654fbb0..b4ce1ed 100644 --- a/scanner.yml +++ b/scanner.yml @@ -1,6 +1,27 @@ -.boost_setup: - image: "docker:26.1.0" +spec: + inputs: + dnd_image: + type: string + default: "docker:26.1.0-dind" + docker_image: + type: string + default: "docker:26.1.0" +--- + +workflow: + rules: + - if: $BOOST_DOCKER_PROXY == "group" + variables: + IMAGE_PREFIX: $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/ + - if: $BOOST_DOCKER_PROXY == "direct" + variables: + IMAGE_PREFIX: $CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX/ + - when: always + variables: + IMAGE_PREFIX: "" +.boost_setup: + image: ${IMAGE_PREFIX}$[[ inputs.docker_image ]] before_script: - | { @@ -65,10 +86,9 @@ echo "${CI_DEPENDENCY_PROXY_PASSWORD}" | docker login "${CI_DEPENDENCY_PROXY_SERVER}" -u "${CI_DEPENDENCY_PROXY_USER}" --password-stdin fi - .boost_dind: services: - - name: "docker:26.1.0-dind" + - name: ${IMAGE_PREFIX}$[[ inputs.dnd_image ]] alias: dockerdaemon # Support for listening on TCP without authentication or explicit # intent to run without authentication will be removed in the next