mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-08 17:42:56 +01:00
Introduce a report-built-images job to gather the list of all built images
This commit is contained in:
parent
439201893a
commit
2ddf1ada73
4 changed files with 33 additions and 17 deletions
|
|
@ -18,8 +18,6 @@ default:
|
|||
image: ${BASE_BUILD_REGISTRY_IMAGE}/debian-bullseye-slim:docker-${DOCKER_VERSION}
|
||||
services:
|
||||
- docker:${DOCKER_VERSION}-dind
|
||||
before_script:
|
||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
|
||||
tags:
|
||||
- gitlab-org-docker
|
||||
|
||||
|
|
@ -37,6 +35,7 @@ stages:
|
|||
- gitlab-cng
|
||||
- gitlab-kas
|
||||
- gitlab-workhorse
|
||||
- report
|
||||
|
||||
variables:
|
||||
DOCKER_HOST: tcp://docker:2375
|
||||
|
|
@ -44,7 +43,16 @@ variables:
|
|||
DOCKER_VERSION: "24.0.5"
|
||||
|
||||
dont-interrupt-me:
|
||||
extends: .dont-interrupt-me
|
||||
stage: .pre
|
||||
interruptible: false
|
||||
script:
|
||||
- echo "This jobs makes sure this pipeline won't be interrupted! See https://docs.gitlab.com/ee/ci/yaml/#interruptible."
|
||||
rules:
|
||||
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
||||
allow_failure: true
|
||||
- if: $CI_MERGE_REQUEST_IID
|
||||
when: manual
|
||||
allow_failure: true
|
||||
|
||||
cache-chrome-chromium:
|
||||
extends: .cache-google-chrome
|
||||
|
|
|
|||
|
|
@ -18,9 +18,16 @@
|
|||
fi
|
||||
- docker buildx create --use # creates and set's to active buildkit builder
|
||||
|
||||
.with-built-image-artifact:
|
||||
artifacts:
|
||||
paths: ["*-built-image.txt"]
|
||||
expire_in: 7d
|
||||
|
||||
.build_dynamic_image:
|
||||
stage: custom
|
||||
extends: .install-qemu
|
||||
extends:
|
||||
- .install-qemu
|
||||
- .with-built-image-artifact
|
||||
needs: []
|
||||
script:
|
||||
- ./scripts/lib/custom-docker-build
|
||||
|
|
@ -30,7 +37,9 @@
|
|||
|
||||
.build_static_image:
|
||||
stage: custom
|
||||
extends: .install-qemu
|
||||
extends:
|
||||
- .install-qemu
|
||||
- .with-built-image-artifact
|
||||
needs: []
|
||||
script:
|
||||
# Hack to set an array in /bin/sh
|
||||
|
|
@ -94,15 +103,3 @@
|
|||
- if: '$CI_MERGE_REQUEST_IID'
|
||||
when: manual
|
||||
allow_failure: true
|
||||
|
||||
.dont-interrupt-me:
|
||||
stage: .pre
|
||||
interruptible: false
|
||||
script:
|
||||
- echo "This jobs makes sure this pipeline won't be interrupted! See https://docs.gitlab.com/ee/ci/yaml/#interruptible."
|
||||
rules:
|
||||
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
||||
allow_failure: true
|
||||
- if: $CI_MERGE_REQUEST_IID
|
||||
when: manual
|
||||
allow_failure: true
|
||||
|
|
|
|||
10
.gitlab/ci/report.yml
Normal file
10
.gitlab/ci/report.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
report-built-images:
|
||||
image: alpine
|
||||
stage: report
|
||||
script:
|
||||
- cat *-built-image.txt > all-built-images.txt
|
||||
- cat all-built-images.txt
|
||||
artifacts:
|
||||
paths: ["all-built-images.txt"]
|
||||
expire_in: 90d
|
||||
|
||||
|
|
@ -494,6 +494,7 @@ function build_custom_if_needed() {
|
|||
run_command docker push "$full_image_name"
|
||||
fi
|
||||
fi
|
||||
echo "${CI_JOB_URL}: $full_image_name" > "${CI_JOB_ID}-${CI_JOB_NAME_SLUG}-built-image.txt"
|
||||
printf "\n\nSUCCESS - Successfully built:\n\t%s\n" "$full_image_name"
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue