2021-09-30 23:02:18 +05:30
|
|
|
.base-image-build:
|
|
|
|
extends: .use-kaniko
|
2022-08-13 15:12:31 +05:30
|
|
|
variables:
|
2023-01-13 00:05:48 +05:30
|
|
|
GIT_LFS_SKIP_SMUDGE: 1 # disable pulling objects from lfs
|
|
|
|
retry: 2
|
|
|
|
|
|
|
|
.base-image-build-buildx:
|
|
|
|
extends: .use-buildx
|
|
|
|
variables:
|
|
|
|
GIT_LFS_SKIP_SMUDGE: 1 # disable pulling objects from lfs
|
2021-09-30 23:02:18 +05:30
|
|
|
retry: 2
|
|
|
|
|
|
|
|
# This image is used by:
|
|
|
|
# - The `review-qa-*` jobs
|
2022-10-11 01:57:18 +05:30
|
|
|
# - The `e2e:package-and-test` child pipeline test stage jobs
|
2021-04-29 21:17:54 +05:30
|
|
|
# See https://docs.gitlab.com/ee/development/testing_guide/end_to_end/index.html#testing-code-in-merge-requests for more details.
|
2020-07-28 23:09:34 +05:30
|
|
|
build-qa-image:
|
|
|
|
extends:
|
2023-01-13 00:05:48 +05:30
|
|
|
- .base-image-build-buildx
|
2020-07-28 23:09:34 +05:30
|
|
|
- .build-images:rules:build-qa-image
|
|
|
|
stage: build-images
|
|
|
|
needs: []
|
|
|
|
script:
|
2023-01-13 00:05:48 +05:30
|
|
|
- run_timed_command "scripts/build_qa_image"
|
2020-07-28 23:09:34 +05:30
|
|
|
|
2023-03-17 16:20:25 +05:30
|
|
|
build-qa-image as-if-foss:
|
|
|
|
extends:
|
|
|
|
- build-qa-image
|
|
|
|
- .as-if-foss
|
2023-04-23 21:23:45 +05:30
|
|
|
- .build-images:rules:build-qa-image-as-if-foss
|
|
|
|
|
|
|
|
# Prepares an image with GDK configured based on code in master. This saves some time in MRs because some installation
|
|
|
|
# and complilation will have already been performed.
|
|
|
|
build-qa-on-gdk-master-image:
|
|
|
|
extends:
|
|
|
|
- .base-image-build-buildx
|
|
|
|
- .build-images:rules:build-qa-on-gdk-master-image
|
|
|
|
tags:
|
|
|
|
- e2e
|
|
|
|
stage: build-images
|
|
|
|
needs: []
|
|
|
|
variables:
|
|
|
|
QA_GDK_IMAGE: "${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-qa-gdk"
|
|
|
|
before_script:
|
|
|
|
- !reference [.use-buildx, before_script]
|
|
|
|
- sysctl -n -w fs.inotify.max_user_watches=524288
|
|
|
|
script:
|
|
|
|
- |
|
|
|
|
docker buildx build \
|
|
|
|
--cache-to=type=inline \
|
|
|
|
--cache-from ${QA_GDK_IMAGE}:master \
|
|
|
|
--platform=${ARCH:-amd64} \
|
|
|
|
--add-host gdk.test:127.0.0.1 \
|
|
|
|
--tag ${QA_GDK_IMAGE}:master \
|
|
|
|
--file="qa/gdk/Dockerfile" \
|
|
|
|
--push \
|
|
|
|
${CI_PROJECT_DIR}
|
2023-03-17 16:20:25 +05:30
|
|
|
|
2020-07-28 23:09:34 +05:30
|
|
|
build-assets-image:
|
|
|
|
extends:
|
2021-09-30 23:02:18 +05:30
|
|
|
- .base-image-build
|
2020-07-28 23:09:34 +05:30
|
|
|
- .build-images:rules:build-assets-image
|
|
|
|
stage: build-images
|
|
|
|
needs: ["compile-production-assets"]
|
|
|
|
script:
|
2023-03-04 22:38:38 +05:30
|
|
|
- skopeo login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
2020-07-28 23:09:34 +05:30
|
|
|
- run_timed_command "scripts/build_assets_image"
|
2023-03-04 22:38:38 +05:30
|
|
|
artifacts:
|
|
|
|
expire_in: 7 days
|
|
|
|
paths:
|
|
|
|
# The `cached-assets-hash.txt` file is used in `review-build-cng-env` (`.gitlab/ci/review-apps/main.gitlab-ci.yml`)
|
|
|
|
# to pass the assets image tag to the CNG downstream pipeline.
|
|
|
|
- cached-assets-hash.txt
|