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/releaser.rb')
-rw-r--r--lib/gitlab/ci/build/releaser.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/gitlab/ci/build/releaser.rb b/lib/gitlab/ci/build/releaser.rb
index facb5f619bd..9720bb1123a 100644
--- a/lib/gitlab/ci/build/releaser.rb
+++ b/lib/gitlab/ci/build/releaser.rb
@@ -18,8 +18,9 @@ module Gitlab
command = BASE_COMMAND.dup
single_flags.each { |k, v| command.concat(" --#{k.to_s.dasherize} \"#{v}\"") }
array_commands.each { |k, v| v.each { |elem| command.concat(" --#{k.to_s.singularize.dasherize} \"#{elem}\"") } }
+ asset_links.each { |link| command.concat(" --assets-link #{stringified_json(link)}") }
- [command]
+ [command.freeze]
end
private
@@ -31,6 +32,14 @@ module Gitlab
def array_commands
config.slice(*ARRAY_FLAGS)
end
+
+ def asset_links
+ config.dig(:assets, :links) || []
+ end
+
+ def stringified_json(object)
+ "#{object.to_json.to_json}"
+ end
end
end
end