debian-mirror-gitlab/lib/gitlab/template/gitlab_ci_yml_template.rb

32 lines
723 B
Ruby
Raw Normal View History

2016-06-22 15:30:34 +05:30
module Gitlab
module Template
2016-09-13 17:45:13 +05:30
class GitlabCiYmlTemplate < BaseTemplate
2016-06-22 15:30:34 +05:30
def content
explanation = "# This file is a template, and might need editing before it works on your project."
[explanation, super].join("\n")
end
class << self
def extension
'.gitlab-ci.yml'
end
def categories
{
"General" => '',
"Pages" => 'Pages'
}
end
def base_dir
Rails.root.join('vendor/gitlab-ci-yml')
end
2016-09-13 17:45:13 +05:30
def finder(project = nil)
Gitlab::Template::Finders::GlobalTemplateFinder.new(self.base_dir, self.extension, self.categories)
end
2016-06-22 15:30:34 +05:30
end
end
end
end