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/build/step.rb')
-rw-r--r--lib/gitlab/ci/build/step.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/gitlab/ci/build/step.rb b/lib/gitlab/ci/build/step.rb
index 48111ae5717..f8550b50905 100644
--- a/lib/gitlab/ci/build/step.rb
+++ b/lib/gitlab/ci/build/step.rb
@@ -20,6 +20,19 @@ module Gitlab
end
end
+ def from_release(job)
+ return unless Gitlab::Ci::Features.release_generation_enabled?
+
+ release = job.options[:release]
+ return unless release
+
+ self.new(:release).tap do |step|
+ step.script = Gitlab::Ci::Build::Releaser.new(config: job.options[:release]).script
+ step.timeout = job.metadata_timeout
+ step.when = WHEN_ON_SUCCESS
+ end
+ end
+
def from_after_script(job)
after_script = job.options[:after_script]
return unless after_script