diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 09:08:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 09:08:42 +0000 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /scripts/trigger-build | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) | |
download | gitlab-ce-b76ae638462ab0f673e5915986070518dd3f9ad3.tar.gz |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'scripts/trigger-build')
-rwxr-xr-x | scripts/trigger-build | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/scripts/trigger-build b/scripts/trigger-build index cb235677b5d..5af45ec09f2 100755 --- a/scripts/trigger-build +++ b/scripts/trigger-build @@ -124,14 +124,19 @@ module Trigger end class Omnibus < Base + def self.access_token + # Default to "Multi-pipeline (from 'gitlab-org/gitlab' 'package-and-qa' job)" at https://gitlab.com/gitlab-org/build/omnibus-gitlab-mirror/-/settings/access_tokens + ENV['OMNIBUS_GITLAB_PROJECT_ACCESS_TOKEN'] || super + end + private def downstream_project_path - ENV['OMNIBUS_PROJECT_PATH'] || 'gitlab-org/build/omnibus-gitlab-mirror' + ENV.fetch('OMNIBUS_PROJECT_PATH', 'gitlab-org/build/omnibus-gitlab-mirror') end def ref - ENV['OMNIBUS_BRANCH'] || 'master' + ENV.fetch('OMNIBUS_BRANCH', 'master') end def extra_variables @@ -143,36 +148,33 @@ module Trigger { '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']}", + 'QA_IMAGE' => ENV['QA_IMAGE'], 'SKIP_QA_DOCKER' => 'true', 'ALTERNATIVE_SOURCES' => 'true', 'SECURITY_SOURCES' => Trigger.security? ? 'true' : 'false', 'ee' => Trigger.ee? ? 'true' : 'false', - 'QA_BRANCH' => ENV['QA_BRANCH'] || 'master' + 'QA_BRANCH' => ENV['QA_BRANCH'] || 'master', + 'CACHE_UPDATE' => ENV['OMNIBUS_GITLAB_CACHE_UPDATE'] } end end class CNG < Base + def self.access_token + # Default to "Multi-pipeline (from 'gitlab-org/gitlab' 'cloud-native-image' job)" at https://gitlab.com/gitlab-org/build/CNG/-/settings/access_tokens + ENV['CNG_PROJECT_ACCESS_TOKEN'] || super + end + private def downstream_project_path - ENV['CNG_PROJECT_PATH'] || 'gitlab-org/build/CNG-mirror' + ENV.fetch('CNG_PROJECT_PATH', 'gitlab-org/build/CNG') end def ref - default_ref = - if ENV['CI_COMMIT_REF_NAME'] =~ /^[\d-]+-stable(-ee)?$/ - ENV['CI_COMMIT_REF_NAME'] - else - 'master' - end - - ENV['CNG_BRANCH'] || default_ref - end + return ENV['CI_COMMIT_REF_NAME'] if ENV['CI_COMMIT_REF_NAME'] =~ /^[\d-]+-stable(-ee)?$/ - def trigger_token - ENV['CI_JOB_TOKEN'] + ENV.fetch('CNG_BRANCH', 'master') end def extra_variables @@ -204,7 +206,8 @@ module Trigger class Docs < Base def self.access_token - ENV['DOCS_PROJECT_API_TOKEN'] + # Default to "DOCS_PROJECT_API_TOKEN" at https://gitlab.com/gitlab-org/gitlab-docs/-/settings/access_tokens + ENV['DOCS_PROJECT_API_TOKEN'] || super end SUCCESS_MESSAGE = <<~MSG @@ -253,11 +256,11 @@ module Trigger end def downstream_project_path - ENV['DOCS_PROJECT_PATH'] || 'gitlab-org/gitlab-docs' + ENV.fetch('DOCS_PROJECT_PATH', 'gitlab-org/gitlab-docs') end def ref - ENV['DOCS_BRANCH'] || 'main' + ENV.fetch('DOCS_BRANCH', 'main') end # `gitlab-org/gitlab-docs` pipeline trigger "Triggered from gitlab-org/gitlab 'review-docs-deploy' job" @@ -349,7 +352,7 @@ module Trigger end def downstream_project_path - ENV['GITLABCOM_DATABASE_TESTING_PROJECT_PATH'] || 'gitlab-com/database-team/gitlab-com-database-testing' + ENV.fetch('GITLABCOM_DATABASE_TESTING_PROJECT_PATH', 'gitlab-com/database-team/gitlab-com-database-testing') end def extra_variables |