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/data_builder/pipeline.rb')
-rw-r--r--lib/gitlab/data_builder/pipeline.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/gitlab/data_builder/pipeline.rb b/lib/gitlab/data_builder/pipeline.rb
index 3036bc57ca5..7fd1b9cd228 100644
--- a/lib/gitlab/data_builder/pipeline.rb
+++ b/lib/gitlab/data_builder/pipeline.rb
@@ -67,7 +67,8 @@ module Gitlab
artifacts_file: {
filename: build.artifacts_file&.filename,
size: build.artifacts_size
- }
+ },
+ environment: environment_hook_attrs(build)
}
end
@@ -80,6 +81,15 @@ module Gitlab
tags: runner.tags&.map(&:name)
}
end
+
+ def environment_hook_attrs(build)
+ return unless build.has_environment?
+
+ {
+ name: build.expanded_environment_name,
+ action: build.environment_action
+ }
+ end
end
end
end