mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-10 13:16:09 +10:00
GitLab CI Yaml template dropdown ## What does this MR do? Make it possible to select a dropdown for an easy start with GitLab CI. ## What are the relevant issue numbers? Closes #17521 ## TODO - [ ] Backend - [x] CHANGELOG item - [x] Fix rubocop failure - [x] API Support - [x] New tests - [x] Add disclaimer to the top of the gitlab-ci.yml - [ ] Frontend - [x] New tests See merge request !4411
28 lines
558 B
Ruby
28 lines
558 B
Ruby
module Gitlab
|
|
module Template
|
|
class GitlabCiYml < BaseTemplate
|
|
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
|
|
end
|
|
end
|
|
end
|
|
end
|