2021-06-22 09:07:12 +00:00
.base-image-build :
extends : .use-kaniko
2022-07-18 21:09:55 +00:00
variables :
GIT_LFS_SKIP_SMUDGE : 1
2021-06-22 09:07:12 +00:00
retry : 2
# This image is used by:
# - The `review-qa-*` jobs
2022-08-30 12:12:25 +00:00
# - The `e2e:package-and-test` child pipeline test stage jobs
2021-04-01 18:13:56 +00:00
# See https://docs.gitlab.com/ee/development/testing_guide/end_to_end/index.html#testing-code-in-merge-requests for more details.
2020-06-18 18:08:58 +00:00
build-qa-image :
extends :
2021-06-22 09:07:12 +00:00
- .base-image-build
2020-06-18 18:08:58 +00:00
- .build-images:rules:build-qa-image
stage : build-images
needs : [ ]
2022-08-30 12:12:25 +00:00
variables :
# Default latest tag for particular branch
QA_IMAGE_BRANCH : ${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_COMMIT_REF_SLUG}
2020-06-18 18:08:58 +00:00
script :
2022-09-02 09:10:27 +00:00
- export QA_IMAGE="${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-ee-qa:${CI_COMMIT_SHA}"
2021-07-21 18:09:27 +00:00
- echo $QA_IMAGE
2021-10-06 06:09:43 +00:00
- echo $QA_IMAGE_BRANCH
2022-06-08 12:08:46 +00:00
- |
/kaniko/executor \
--context=${CI_PROJECT_DIR} \
--dockerfile=${CI_PROJECT_DIR}/qa/Dockerfile \
--destination=${QA_IMAGE} \
--destination=${QA_IMAGE_BRANCH} \
--build-arg=CHROME_VERSION=${CHROME_VERSION} \
--build-arg=DOCKER_VERSION=${DOCKER_VERSION} \
2022-07-07 21:09:22 +00:00
--build-arg=QA_BUILD_TARGET=${QA_BUILD_TARGET:-qa} \
2022-06-08 12:08:46 +00:00
--cache=true
2020-06-18 18:08:58 +00:00
# This image is used by:
# - The `CNG` pipelines (via the `review-build-cng` job): https://gitlab.com/gitlab-org/build/CNG/-/blob/cfc67136d711e1c8c409bf8e57427a644393da2f/.gitlab-ci.yml#L335
2022-08-30 12:12:25 +00:00
# - The `omnibus-gitlab` pipelines (via the `e2e:package-and-test` job): https://gitlab.com/gitlab-org/omnibus-gitlab/-/blob/dfd1ad475868fc84e91ab7b5706aa03e46dc3a86/.gitlab-ci.yml#L130
2020-06-18 18:08:58 +00:00
build-assets-image :
extends :
2021-06-22 09:07:12 +00:00
- .base-image-build
2020-06-18 18:08:58 +00:00
- .build-images:rules:build-assets-image
stage : build-images
needs : [ "compile-production-assets" ]
script :
# TODO: Change the image tag to be the MD5 of assets files and skip image building if the image exists
# We'll also need to pass GITLAB_ASSETS_TAG to the trigerred omnibus-gitlab pipeline similarly to how we do it for trigerred CNG pipelines
# https://gitlab.com/gitlab-org/gitlab/issues/208389
- run_timed_command "scripts/build_assets_image"