Commit d7296011 authored by Dylan Griffith's avatar Dylan Griffith

Merge branch '223162-enclose-release-cli-steps-in-an-array' into 'master'

Enclose `release-cli` steps in an array

Closes #223162

See merge request gitlab-org/gitlab!34913
parents d1edb853 ee9d82c7
---
title: Enclose `release-cli` steps in an array
merge_request: 34913
author:
type: fixed
......@@ -16,7 +16,7 @@ module Gitlab
command = BASE_COMMAND.dup
config.each { |k, v| command.concat(" --#{k.to_s.dasherize} \"#{v}\"") }
command
[command]
end
end
end
......
......@@ -19,7 +19,7 @@ describe Gitlab::Ci::Build::Releaser do
end
it 'generates the script' do
expect(subject).to eq('release-cli create --name "Release $CI_COMMIT_SHA" --description "Created using the release-cli $EXTRA_DESCRIPTION" --tag-name "release-$CI_COMMIT_SHA" --ref "$CI_COMMIT_SHA"')
expect(subject).to eq(['release-cli create --name "Release $CI_COMMIT_SHA" --description "Created using the release-cli $EXTRA_DESCRIPTION" --tag-name "release-$CI_COMMIT_SHA" --ref "$CI_COMMIT_SHA"'])
end
end
......@@ -43,7 +43,7 @@ describe Gitlab::Ci::Build::Releaser do
end
it 'generates the script' do
expect(subject).to eq(result)
expect(subject).to eq([result])
end
end
end
......
......@@ -62,7 +62,7 @@ describe Gitlab::Ci::Build::Step do
let(:job) { create(:ci_build, :release_options) }
it 'returns the release-cli command line' do
expect(subject.script).to eq("release-cli create --name \"Release $CI_COMMIT_SHA\" --description \"Created using the release-cli $EXTRA_DESCRIPTION\" --tag-name \"release-$CI_COMMIT_SHA\" --ref \"$CI_COMMIT_SHA\"")
expect(subject.script).to eq(["release-cli create --name \"Release $CI_COMMIT_SHA\" --description \"Created using the release-cli $EXTRA_DESCRIPTION\" --tag-name \"release-$CI_COMMIT_SHA\" --ref \"$CI_COMMIT_SHA\""])
end
end
......
......@@ -668,7 +668,7 @@ describe API::Runner, :clean_gitlab_redis_shared_state do
{
"name" => "release",
"script" =>
"release-cli create --ref \"$CI_COMMIT_SHA\" --name \"Release $CI_COMMIT_SHA\" --tag-name \"release-$CI_COMMIT_SHA\" --description \"Created using the release-cli $EXTRA_DESCRIPTION\"",
["release-cli create --ref \"$CI_COMMIT_SHA\" --name \"Release $CI_COMMIT_SHA\" --tag-name \"release-$CI_COMMIT_SHA\" --description \"Created using the release-cli $EXTRA_DESCRIPTION\""],
"timeout" => 3600,
"when" => "on_success",
"allow_failure" => false
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment