diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2019-04-03 23:51:00 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2019-04-05 11:13:49 +0300 |
commit | e0df05cfbc7f03e8fce27c5e93fda17f634721e7 (patch) | |
tree | f0e04117e15e4fe3ea3502c72261dd1aed51e7d8 /lib/gitlab/template | |
parent | 6d000c9f9cbc65f92ed27ea55a14e5de9b11320d (diff) |
Require all templates to use default stages
Our templates are free to override the 'stages:'.
However, they should follow the convention to always include
'build', 'test', 'deploy' which are defaults when not defined.
Diffstat (limited to 'lib/gitlab/template')
-rw-r--r-- | lib/gitlab/template/base_template.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitlab/template/base_template.rb b/lib/gitlab/template/base_template.rb index 0b4cc571dc0..14c9a3e0389 100644 --- a/lib/gitlab/template/base_template.rb +++ b/lib/gitlab/template/base_template.rb @@ -16,6 +16,12 @@ module Gitlab end alias_method :key, :name + def full_name + Pathname.new(@path) + .relative_path_from(self.class.base_dir) + .to_s + end + def content @finder.read(@path) end |