Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2019-06-06 21:49:04 +0300
committerMatija Čupić <matteeyah@gmail.com>2019-06-17 22:53:09 +0300
commit7ac3723be04ba08cb476ba628cb5c1573ca832c9 (patch)
treea7fe9269e339e4ddd46b196e31a6774ae2675df7 /lib/gitlab/ci/config.rb
parent68a1ba6a296f340fcddf58e5fbd26d51d66bd90b (diff)
Backport CE changes
Backports CE changes from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14011/
Diffstat (limited to 'lib/gitlab/ci/config.rb')
-rw-r--r--lib/gitlab/ci/config.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/gitlab/ci/config.rb b/lib/gitlab/ci/config.rb
index f187e456993..a0275515906 100644
--- a/lib/gitlab/ci/config.rb
+++ b/lib/gitlab/ci/config.rb
@@ -8,6 +8,12 @@ module Gitlab
class Config
ConfigError = Class.new(StandardError)
+ RESCUE_ERRORS = [
+ Gitlab::Config::Loader::FormatError,
+ Extendable::ExtensionError,
+ External::Processor::IncludeError
+ ].freeze
+
def initialize(config, project: nil, sha: nil, user: nil)
@config = Config::Extendable
.new(build_config(config, project: project, sha: sha, user: user))
@@ -15,9 +21,7 @@ module Gitlab
@global = Entry::Global.new(@config)
@global.compose!
- rescue Gitlab::Config::Loader::FormatError,
- Extendable::ExtensionError,
- External::Processor::IncludeError => e
+ rescue *rescue_errors => e
raise Config::ConfigError, e.message
end
@@ -83,6 +87,11 @@ module Gitlab
user: user,
expandset: Set.new).perform
end
+
+ # Overriden in EE
+ def rescue_errors
+ RESCUE_ERRORS
+ end
end
end
end