debian-mirror-gitlab/lib/gitlab/ci/project_config/auto_devops.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
646 B
Ruby
Raw Normal View History

2022-10-11 01:57:18 +05:30
# frozen_string_literal: true
module Gitlab
module Ci
class ProjectConfig
class AutoDevops < Source
def content
strong_memoize(:content) do
next unless project&.auto_devops_enabled?
template = Gitlab::Template::GitlabCiYmlTemplate.find(template_name)
YAML.dump('include' => [{ 'template' => template.full_name }])
end
end
2023-05-27 22:25:52 +05:30
def internal_include_prepended?
true
end
2022-10-11 01:57:18 +05:30
def source
:auto_devops_source
end
private
def template_name
'Auto-DevOps'
end
end
end
end
end