Create an annotated Omnibus tag during auto-deploy

parent 9b397538
......@@ -57,10 +57,16 @@ module ReleaseTools
$stdout.puts "Creating `#{project}` tag `#{tag_name}`".indent(4)
message = +"Auto-deploy #{tag_name}\n\n"
version_map.each_pair do |file, version|
message << "#{file}: #{version}\n"
end
ReleaseTools::GitlabClient.create_tag(
project,
tag_name,
commit.id
commit.id,
message.strip
)
end
......
......@@ -69,7 +69,7 @@ describe ReleaseTools::PassingBuild do
service.trigger_build(version_map)
end
it 'tags Omnibus', :silence_stdout do
it 'tags Omnibus with an annotated tag', :silence_stdout do
commit = double('Commit', id: 'abcdefg')
expect(service).to receive(:update_omnibus)
......@@ -80,7 +80,12 @@ describe ReleaseTools::PassingBuild do
expect(ReleaseTools::AutoDeploy::Naming).to receive(:tag)
.and_return('tag-name')
expect(ReleaseTools::GitlabClient).to receive(:create_tag)
.with(ReleaseTools::Project::OmnibusGitlab, 'tag-name', commit.id)
.with(
ReleaseTools::Project::OmnibusGitlab,
'tag-name',
commit.id,
"Auto-deploy tag-name\n\nVERSION: 1.2.3"
)
service.trigger_build(version_map)
end
......
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