diff options
author | Sean McGivern <sean@gitlab.com> | 2019-04-05 13:18:10 +0300 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2019-04-15 13:47:35 +0300 |
commit | 026896cca27ac63795bf1d0e606f6813500d9475 (patch) | |
tree | 037d47e705869ec6baee2d6b0618f0c0c70aad08 /lib/gitlab/ci/config.rb | |
parent | c32b2d3d2b7d4e2ce8b58eee12b31f1f907e57ed (diff) |
Merge branch 'require-all-templates-to-include-default-stages' into 'master'
Require all templates to use default stages
Closes #59992
See merge request gitlab-org/gitlab-ce!26954
(cherry picked from commit 39eb16aab2dbac3347f61f83fb60f5448d44e965)
e0df05cf Require all templates to use default stages
Diffstat (limited to 'lib/gitlab/ci/config.rb')
-rw-r--r-- | lib/gitlab/ci/config.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/gitlab/ci/config.rb b/lib/gitlab/ci/config.rb index 15643fa03ac..f187e456993 100644 --- a/lib/gitlab/ci/config.rb +++ b/lib/gitlab/ci/config.rb @@ -73,17 +73,13 @@ module Gitlab def build_config(config, project:, sha:, user:) initial_config = Gitlab::Config::Loader::Yaml.new(config).load! - if project - process_external_files(initial_config, project: project, sha: sha, user: user) - else - initial_config - end + process_external_files(initial_config, project: project, sha: sha, user: user) end def process_external_files(config, project:, sha:, user:) Config::External::Processor.new(config, project: project, - sha: sha || project.repository.root_ref_sha, + sha: sha || project&.repository&.root_ref_sha, user: user, expandset: Set.new).perform end |