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/ci/config/external/file | |
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/ci/config/external/file')
-rw-r--r-- | lib/gitlab/ci/config/external/file/local.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/ci/config/external/file/local.rb b/lib/gitlab/ci/config/external/file/local.rb index 229a06451e8..cac321ec4a6 100644 --- a/lib/gitlab/ci/config/external/file/local.rb +++ b/lib/gitlab/ci/config/external/file/local.rb @@ -21,7 +21,9 @@ module Gitlab private def validate_content! - if content.nil? + if context.project&.repository.nil? + errors.push("Local file `#{location}` does not have project!") + elsif content.nil? errors.push("Local file `#{location}` does not exist!") elsif content.blank? errors.push("Local file `#{location}` is empty!") |