From 8547e6a1ec326d715cde1f11689dd294ca6a4cc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Mon, 15 Jun 2020 12:05:15 +0200 Subject: [PATCH 1/2] ci: Pass IMAGE_TAG, QA_IMAGE, SKIP_QA_DOCKER to omnibus-gitlab pipeline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- .gitlab/ci/build-images.gitlab-ci.yml | 8 +++++--- scripts/trigger-build | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitlab/ci/build-images.gitlab-ci.yml b/.gitlab/ci/build-images.gitlab-ci.yml index e6c3e7598d39ee..6ee3e3bc8e9877 100644 --- a/.gitlab/ci/build-images.gitlab-ci.yml +++ b/.gitlab/ci/build-images.gitlab-ci.yml @@ -1,6 +1,8 @@ -# This image is used by the `review-qa-*` jobs. Not currently used by the `omnibus-gitlab` pipelines which rebuild this -# image, e.g. https://gitlab.com/gitlab-org/build/omnibus-gitlab-mirror/-/jobs/587107399, which we could probably avoid. -# See https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5429. +# This image is used by the `review-qa-*` jobs. The image name is also passed to the downstream `omnibus-gitlab-mirror` pipeline +# triggered by `package-and-qa` so that it doesn't have to rebuilt it a second time. The downstream `omnibus-gitlab-mirror` pipeline +# itself passes the image name to the `gitlab-qa-mirror` pipeline so that it can use it instead of inferring an end-to-end image +# from the GitLab image built by the downstream `omnibus-gitlab-mirror` pipeline. +# See https://docs.gitlab.com/ee/development/testing_guide/end_to_end/index.html#testing-code-in-merge-requests for more details. build-qa-image: extends: - .use-kaniko diff --git a/scripts/trigger-build b/scripts/trigger-build index 28f514dd799991..c81af332b0e4a6 100755 --- a/scripts/trigger-build +++ b/scripts/trigger-build @@ -136,13 +136,15 @@ module Trigger def extra_variables # Use CI_MERGE_REQUEST_SOURCE_BRANCH_SHA for omnibus checkouts due to pipeline for merged results - # and fallback to CI_COMMIT_SHA for the `detached` pipelines. - # We also set IMAGE_TAG so the GitLab and QA docker images are tagged with - # that SHA. + # and fallback to CI_COMMIT_SHA (merged result commit) for the non-MR pipelines. + # See https://docs.gitlab.com/ee/development/testing_guide/end_to_end/index.html#with-pipeline-for-merged-results. + # We also set IMAGE_TAG so the GitLab Docker image is tagged with that SHA. source_sha = Trigger.non_empty_variable_value('CI_MERGE_REQUEST_SOURCE_BRANCH_SHA') || ENV['CI_COMMIT_SHA'] { 'GITLAB_VERSION' => source_sha, 'IMAGE_TAG' => source_sha, + 'QA_IMAGE' => "#{ENV['CI_REGISTRY']}/#{ENV['CI_PROJECT_PATH']}/gitlab-ee-qa:#{ENV['CI_COMMIT_REF_SLUG']}", + 'SKIP_QA_DOCKER' => 'true', 'ALTERNATIVE_SOURCES' => 'true', 'SECURITY_SOURCES' => Trigger.security? ? 'true' : 'false', 'ee' => Trigger.ee? ? 'true' : 'false', -- GitLab From 931e710521303ad499fb7af724ffd22e349bcd4e Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Thu, 1 Apr 2021 13:24:20 +0000 Subject: [PATCH 2/2] Apply 1 suggestion(s) to 1 file(s) --- .gitlab/ci/build-images.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/ci/build-images.gitlab-ci.yml b/.gitlab/ci/build-images.gitlab-ci.yml index 6ee3e3bc8e9877..4e35247204751b 100644 --- a/.gitlab/ci/build-images.gitlab-ci.yml +++ b/.gitlab/ci/build-images.gitlab-ci.yml @@ -1,5 +1,5 @@ # This image is used by the `review-qa-*` jobs. The image name is also passed to the downstream `omnibus-gitlab-mirror` pipeline -# triggered by `package-and-qa` so that it doesn't have to rebuilt it a second time. The downstream `omnibus-gitlab-mirror` pipeline +# triggered by `package-and-qa` so that it doesn't have to rebuild it a second time. The downstream `omnibus-gitlab-mirror` pipeline # itself passes the image name to the `gitlab-qa-mirror` pipeline so that it can use it instead of inferring an end-to-end image # from the GitLab image built by the downstream `omnibus-gitlab-mirror` pipeline. # See https://docs.gitlab.com/ee/development/testing_guide/end_to_end/index.html#testing-code-in-merge-requests for more details. -- GitLab