Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-30 15:07:29 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-30 15:07:29 +0300
commit96e4317f73c749841cc1d808b788d43aa3407a4a (patch)
tree65b8eaff9de051b5cf377ab99b057160401f22c1 /.gitlab
parentef144889c1bb80372e25f38fc89c7832ce84417a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to '.gitlab')
-rw-r--r--.gitlab/ci/cng/main.gitlab-ci.yml61
-rw-r--r--.gitlab/ci/release-environments/main.gitlab-ci.yml68
-rw-r--r--.gitlab/ci/review-apps/main.gitlab-ci.yml54
-rw-r--r--.gitlab/ci/rules.gitlab-ci.yml1
4 files changed, 71 insertions, 113 deletions
diff --git a/.gitlab/ci/cng/main.gitlab-ci.yml b/.gitlab/ci/cng/main.gitlab-ci.yml
new file mode 100644
index 00000000000..325b06d59cd
--- /dev/null
+++ b/.gitlab/ci/cng/main.gitlab-ci.yml
@@ -0,0 +1,61 @@
+---
+default:
+ interruptible: true
+
+stages:
+ - prepare
+ - deploy
+
+include:
+ - local: .gitlab/ci/global.gitlab-ci.yml
+
+review-build-cng-env:
+ image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}ruby:${RUBY_VERSION}-alpine3.16
+ stage: prepare
+ needs:
+ # We need this job because we need its `cached-assets-hash.txt` artifact, so that we can pass the assets image tag to the downstream CNG pipeline.
+ - pipeline: $PARENT_PIPELINE_ID
+ job: build-assets-image
+ variables:
+ BUILD_ENV: build.env
+ before_script:
+ - source ./scripts/utils.sh
+ - install_gitlab_gem
+ script:
+ - 'ruby -r./scripts/trigger-build.rb -e "puts Trigger.variables_for_env_file(Trigger::CNG.new.variables)" > $BUILD_ENV'
+ - echo "GITLAB_ASSETS_TAG=$(assets_image_tag)" >> $BUILD_ENV
+ - ruby -e 'puts "FULL_RUBY_VERSION=#{RUBY_VERSION}"' >> build.env
+ - cat $BUILD_ENV
+ artifacts:
+ reports:
+ dotenv: $BUILD_ENV
+ paths:
+ - $BUILD_ENV
+ expire_in: 7 days
+ when: always
+
+review-build-cng:
+ stage: prepare
+ inherit:
+ variables: false
+ variables:
+ GITLAB_REF_SLUG: "${GITLAB_REF_SLUG}"
+ # CNG pipeline specific variables
+ GITLAB_VERSION: "${GITLAB_VERSION}"
+ GITLAB_TAG: "${GITLAB_TAG}"
+ GITLAB_ASSETS_TAG: "${GITLAB_ASSETS_TAG}"
+ FORCE_RAILS_IMAGE_BUILDS: "${FORCE_RAILS_IMAGE_BUILDS}"
+ CE_PIPELINE: "${CE_PIPELINE}" # Based on https://docs.gitlab.com/ee/ci/jobs/job_control.html#check-if-a-variable-exists, `if: '$CE_PIPELINE'` will evaluate to `false` when this variable is empty
+ EE_PIPELINE: "${EE_PIPELINE}" # Based on https://docs.gitlab.com/ee/ci/jobs/job_control.html#check-if-a-variable-exists, `if: '$EE_PIPELINE'` will evaluate to `false` when this variable is empty
+ GITLAB_ELASTICSEARCH_INDEXER_VERSION: "${GITLAB_ELASTICSEARCH_INDEXER_VERSION}"
+ GITLAB_KAS_VERSION: "${GITLAB_KAS_VERSION}"
+ GITLAB_METRICS_EXPORTER_VERSION: "${GITLAB_METRICS_EXPORTER_VERSION}"
+ GITLAB_PAGES_VERSION: "${GITLAB_PAGES_VERSION}"
+ GITLAB_SHELL_VERSION: "${GITLAB_SHELL_VERSION}"
+ GITLAB_WORKHORSE_VERSION: "${GITLAB_WORKHORSE_VERSION}"
+ GITALY_SERVER_VERSION: "${GITALY_SERVER_VERSION}"
+ RUBY_VERSION: "${FULL_RUBY_VERSION}"
+ trigger:
+ project: gitlab-org/build/CNG-mirror
+ branch: $TRIGGER_BRANCH
+ strategy: depend
diff --git a/.gitlab/ci/release-environments/main.gitlab-ci.yml b/.gitlab/ci/release-environments/main.gitlab-ci.yml
index aa6afee57ae..6c28ba3e2dd 100644
--- a/.gitlab/ci/release-environments/main.gitlab-ci.yml
+++ b/.gitlab/ci/release-environments/main.gitlab-ci.yml
@@ -1,69 +1,17 @@
---
-default:
- interruptible: true
-
-stages:
- - prepare
- - deploy
-
include:
- - local: .gitlab/ci/global.gitlab-ci.yml
+ - local: .gitlab/ci/cng/main.gitlab-ci.yml
-release-environments-build-cng-env:
+review-build-cng-env:
allow_failure: true
- image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}ruby:${RUBY_VERSION}-alpine3.16
- stage: prepare
- needs:
- # We need this job because we need its `cached-assets-hash.txt` artifact, so that we can pass the assets image tag to the downstream CNG pipeline.
- - pipeline: $PARENT_PIPELINE_ID
- job: build-assets-image
- variables:
- BUILD_ENV: build.env
- before_script:
- - source ./scripts/utils.sh
- - install_gitlab_gem
- script:
- - 'ruby -r./scripts/trigger-build.rb -e "puts Trigger.variables_for_env_file(Trigger::CNG.new.variables)" > $BUILD_ENV'
- - echo "GITLAB_ASSETS_TAG=$(assets_image_tag)" >> $BUILD_ENV
- - ruby -e 'puts "FULL_RUBY_VERSION=#{RUBY_VERSION}"' >> build.env
- - cat $BUILD_ENV
- artifacts:
- reports:
- dotenv: $BUILD_ENV
- paths:
- - $BUILD_ENV
- expire_in: 7 days
- when: always
-release-environments-build-cng:
- allow_failure: true
- stage: prepare
- needs: ["release-environments-build-cng-env"]
- inherit:
- variables: false
+review-build-cng:
+ needs: ["review-build-cng-env"]
variables:
- GITLAB_REF_SLUG: "${GITLAB_REF_SLUG}"
- # CNG pipeline specific variables
- GITLAB_VERSION: "${GITLAB_VERSION}"
- GITLAB_TAG: "${GITLAB_TAG}"
- GITLAB_ASSETS_TAG: "${GITLAB_ASSETS_TAG}"
- FORCE_RAILS_IMAGE_BUILDS: "${FORCE_RAILS_IMAGE_BUILDS}"
- CE_PIPELINE: "${CE_PIPELINE}" # Based on https://docs.gitlab.com/ee/ci/jobs/job_control.html#check-if-a-variable-exists, `if: '$CE_PIPELINE'` will evaluate to `false` when this variable is empty
- EE_PIPELINE: "${EE_PIPELINE}" # Based on https://docs.gitlab.com/ee/ci/jobs/job_control.html#check-if-a-variable-exists, `if: '$EE_PIPELINE'` will evaluate to `false` when this variable is empty
- GITLAB_ELASTICSEARCH_INDEXER_VERSION: "${GITLAB_ELASTICSEARCH_INDEXER_VERSION}"
- GITLAB_KAS_VERSION: "${GITLAB_KAS_VERSION}"
- GITLAB_METRICS_EXPORTER_VERSION: "${GITLAB_METRICS_EXPORTER_VERSION}"
- GITLAB_PAGES_VERSION: "${GITLAB_PAGES_VERSION}"
- GITLAB_SHELL_VERSION: "${GITLAB_SHELL_VERSION}"
- GITALY_SERVER_VERSION: "${GITALY_SERVER_VERSION}"
- RUBY_VERSION: "${FULL_RUBY_VERSION}"
IMAGE_TAG_EXT: "-${CI_COMMIT_SHORT_SHA}"
- trigger:
- project: gitlab-org/build/CNG-mirror
- branch: $TRIGGER_BRANCH
- strategy: depend
+ allow_failure: true
-release-environments-deploy-env:
+review-deploy-env:
allow_failure: true
stage: deploy
needs: ["release-environments-build-cng"]
@@ -79,10 +27,10 @@ release-environments-deploy-env:
expire_in: 7 days
when: always
-release-environments-deploy:
+review-deploy:
allow_failure: true
stage: deploy
- needs: ["release-environments-deploy-env"]
+ needs: ["review-deploy-env"]
inherit:
variables: false
variables:
diff --git a/.gitlab/ci/review-apps/main.gitlab-ci.yml b/.gitlab/ci/review-apps/main.gitlab-ci.yml
index be26f7c4015..96f815b05e8 100644
--- a/.gitlab/ci/review-apps/main.gitlab-ci.yml
+++ b/.gitlab/ci/review-apps/main.gitlab-ci.yml
@@ -10,6 +10,7 @@ stages:
- dast
include:
+ - local: .gitlab/ci/cng/main.gitlab-ci.yml
- local: .gitlab/ci/global.gitlab-ci.yml
- local: .gitlab/ci/review-apps/rules.gitlab-ci.yml
- local: .gitlab/ci/review-apps/qa.gitlab-ci.yml
@@ -31,63 +32,10 @@ review-build-cng-env:
extends:
- .default-retry
- .review:rules:review-build-cng
- image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}ruby:${RUBY_VERSION}-alpine3.16
- stage: prepare
- needs:
- # We need this job because we need its `cached-assets-hash.txt` artifact, so that we can pass the assets image tag to the downstream CNG pipeline.
- - pipeline: $PARENT_PIPELINE_ID
- job: build-assets-image
- variables:
- BUILD_ENV: build.env
- before_script:
- - source ./scripts/utils.sh
- - install_gitlab_gem
- script:
- - 'ruby -r./scripts/trigger-build.rb -e "puts Trigger.variables_for_env_file(Trigger::CNG.new.variables)" > $BUILD_ENV'
- - echo "GITLAB_ASSETS_TAG=$(assets_image_tag)" >> $BUILD_ENV
- - ruby -e 'puts "FULL_RUBY_VERSION=#{RUBY_VERSION}"' >> build.env
- - cat $BUILD_ENV
- artifacts:
- reports:
- dotenv: $BUILD_ENV
- paths:
- - $BUILD_ENV
- expire_in: 7 days
- when: always
review-build-cng:
extends: .review:rules:review-build-cng
- stage: prepare
needs: ["review-build-cng-env"]
- inherit:
- variables: false
- variables:
- TOP_UPSTREAM_SOURCE_PROJECT: "${TOP_UPSTREAM_SOURCE_PROJECT}"
- TOP_UPSTREAM_SOURCE_REF: "${TOP_UPSTREAM_SOURCE_REF}"
- TOP_UPSTREAM_SOURCE_JOB: "${TOP_UPSTREAM_SOURCE_JOB}"
- TOP_UPSTREAM_SOURCE_SHA: "${TOP_UPSTREAM_SOURCE_SHA}"
- TOP_UPSTREAM_MERGE_REQUEST_PROJECT_ID: "${TOP_UPSTREAM_MERGE_REQUEST_PROJECT_ID}"
- TOP_UPSTREAM_MERGE_REQUEST_IID: "${TOP_UPSTREAM_MERGE_REQUEST_IID}"
- GITLAB_REF_SLUG: "${GITLAB_REF_SLUG}"
- # CNG pipeline specific variables
- GITLAB_VERSION: "${GITLAB_VERSION}"
- GITLAB_TAG: "${GITLAB_TAG}"
- GITLAB_ASSETS_TAG: "${GITLAB_ASSETS_TAG}"
- FORCE_RAILS_IMAGE_BUILDS: "${FORCE_RAILS_IMAGE_BUILDS}"
- CE_PIPELINE: "${CE_PIPELINE}" # Based on https://docs.gitlab.com/ee/ci/jobs/job_control.html#check-if-a-variable-exists, `if: '$CE_PIPELINE'` will evaluate to `false` when this variable is empty
- EE_PIPELINE: "${EE_PIPELINE}" # Based on https://docs.gitlab.com/ee/ci/jobs/job_control.html#check-if-a-variable-exists, `if: '$EE_PIPELINE'` will evaluate to `false` when this variable is empty
- GITLAB_ELASTICSEARCH_INDEXER_VERSION: "${GITLAB_ELASTICSEARCH_INDEXER_VERSION}"
- GITLAB_KAS_VERSION: "${GITLAB_KAS_VERSION}"
- GITLAB_METRICS_EXPORTER_VERSION: "${GITLAB_METRICS_EXPORTER_VERSION}"
- GITLAB_PAGES_VERSION: "${GITLAB_PAGES_VERSION}"
- GITLAB_SHELL_VERSION: "${GITLAB_SHELL_VERSION}"
- GITLAB_WORKHORSE_VERSION: "${GITLAB_WORKHORSE_VERSION}"
- GITALY_SERVER_VERSION: "${GITALY_SERVER_VERSION}"
- RUBY_VERSION: "${FULL_RUBY_VERSION}"
- trigger:
- project: gitlab-org/build/CNG-mirror
- branch: $TRIGGER_BRANCH
- strategy: depend
.review-workflow-base:
image: ${REVIEW_APPS_IMAGE}
diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml
index 3e1eb2c75ec..38173b27e3e 100644
--- a/.gitlab/ci/rules.gitlab-ci.yml
+++ b/.gitlab/ci/rules.gitlab-ci.yml
@@ -169,6 +169,7 @@
- ".gitlab/ci/frontend.gitlab-ci.yml"
- ".gitlab/ci/build-images.gitlab-ci.yml"
- ".gitlab/ci/review.gitlab-ci.yml"
+ - ".gitlab/ci/cng/**/*"
- ".gitlab/ci/review-apps/**/*"
- "scripts/review_apps/**/*"
- "scripts/trigger-build.rb"