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:
Diffstat (limited to 'lib/gitlab/ci/pipeline/chain/config/content/legacy_auto_devops.rb')
-rw-r--r--lib/gitlab/ci/pipeline/chain/config/content/legacy_auto_devops.rb18
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/gitlab/ci/pipeline/chain/config/content/legacy_auto_devops.rb b/lib/gitlab/ci/pipeline/chain/config/content/legacy_auto_devops.rb
index c4cef356628..b282886a56f 100644
--- a/lib/gitlab/ci/pipeline/chain/config/content/legacy_auto_devops.rb
+++ b/lib/gitlab/ci/pipeline/chain/config/content/legacy_auto_devops.rb
@@ -11,7 +11,7 @@ module Gitlab
strong_memoize(:content) do
next unless project&.auto_devops_enabled?
- template = Gitlab::Template::GitlabCiYmlTemplate.find('Auto-DevOps')
+ template = Gitlab::Template::GitlabCiYmlTemplate.find(template_name)
template.content
end
end
@@ -19,6 +19,22 @@ module Gitlab
def source
:auto_devops_source
end
+
+ private
+
+ def template_name
+ if beta_enabled?
+ 'Beta/Auto-DevOps'
+ else
+ 'Auto-DevOps'
+ end
+ end
+
+ def beta_enabled?
+ Feature.enabled?(:auto_devops_beta, project, default_enabled: true) &&
+ # workflow:rules are required by `Beta/Auto-DevOps.gitlab-ci.yml`
+ Feature.enabled?(:workflow_rules, project, default_enabled: true)
+ end
end
end
end