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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-16 21:18:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-16 21:18:33 +0300
commitf64a639bcfa1fc2bc89ca7db268f594306edfd7c (patch)
treea2c3c2ebcc3b45e596949db485d6ed18ffaacfa1 /lib/gitlab/data_builder
parentbfbc3e0d6583ea1a91f627528bedc3d65ba4b10f (diff)
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40
Diffstat (limited to 'lib/gitlab/data_builder')
-rw-r--r--lib/gitlab/data_builder/build.rb13
-rw-r--r--lib/gitlab/data_builder/pipeline.rb12
2 files changed, 23 insertions, 2 deletions
diff --git a/lib/gitlab/data_builder/build.rb b/lib/gitlab/data_builder/build.rb
index e17bd25e57e..c4af5e6608e 100644
--- a/lib/gitlab/data_builder/build.rb
+++ b/lib/gitlab/data_builder/build.rb
@@ -62,7 +62,9 @@ module Gitlab
git_http_url: project.http_url_to_repo,
git_ssh_url: project.ssh_url_to_repo,
visibility_level: project.visibility_level
- }
+ },
+
+ environment: build_environment(build)
}
data
@@ -86,6 +88,15 @@ module Gitlab
tags: runner.tags&.map(&:name)
}
end
+
+ def build_environment(build)
+ return unless build.has_environment?
+
+ {
+ name: build.expanded_environment_name,
+ action: build.environment_action
+ }
+ end
end
end
end
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