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:
Diffstat (limited to 'lib/gitlab/ci/config/entry/processable.rb')
-rw-r--r--lib/gitlab/ci/config/entry/processable.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/ci/config/entry/processable.rb b/lib/gitlab/ci/config/entry/processable.rb
index e0f0903174c..88734ac1186 100644
--- a/lib/gitlab/ci/config/entry/processable.rb
+++ b/lib/gitlab/ci/config/entry/processable.rb
@@ -15,7 +15,7 @@ module Gitlab
include ::Gitlab::Config::Entry::Inheritable
PROCESSABLE_ALLOWED_KEYS = %i[extends stage only except rules variables
- inherit allow_failure when needs resource_group].freeze
+ inherit allow_failure when needs resource_group environment].freeze
MAX_NESTING_LEVEL = 10
included do
@@ -68,6 +68,10 @@ module Gitlab
inherit: false,
default: {}
+ entry :environment, Entry::Environment,
+ description: 'Environment configuration for this job.',
+ inherit: false
+
attributes :extends, :rules, :resource_group
end
@@ -125,6 +129,8 @@ module Gitlab
root_variables_inheritance: root_variables_inheritance,
only: only_value,
except: except_value,
+ environment: environment_defined? ? environment_value : nil,
+ environment_name: environment_defined? ? environment_value[:name] : nil,
resource_group: resource_group }.compact
end