Skip to content

Commit 887df90

Browse files
author
Andrew Patterson
committed
Fix for missing branch_build_package_download_url
Use Build::Info::CI::package_download_url instead of the no longer present Build::Info::CI::branch_build_package_download_url
1 parent 1b86ac5 commit 887df90

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/gitlab/aws_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def create_ami
2929
architecture = 'amd64'
3030
end
3131

32-
@download_url = Build::Info::CI.branch_build_package_download_url(job_name: "Ubuntu-20.04", arch: architecture)
32+
@download_url = Build::Info::CI.package_download_url(job_name: "Ubuntu-20.04", arch: architecture)
3333

3434
system(*%W[support/packer/packer_ami.sh #{@version} #{@type} #{@download_url} #{Build::Info::CI.job_token} #{@license_file}])
3535
end

spec/lib/gitlab/tasks/aws_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def deregister_image(parameters)
4949
allow(Build::Check).to receive(:on_tag?).and_return(true)
5050
allow(Build::Check).to receive(:is_auto_deploy?).and_return(false)
5151
allow(Build::Check).to receive(:is_rc_tag?).and_return(false)
52-
allow(Build::Info::CI).to receive(:branch_build_package_download_url).and_return('http://example.com')
52+
allow(Build::Info::CI).to receive(:package_download_url).and_return('http://example.com')
5353
end
5454

5555
it 'should identify ce category correctly, if specified' do
@@ -129,7 +129,7 @@ def deregister_image(parameters)
129129
allow(Build::Check).to receive(:on_tag?).and_return(true)
130130
allow(Build::Check).to receive(:is_auto_deploy?).and_return(false)
131131
allow(Build::Check).to receive(:is_rc_tag?).and_return(true)
132-
allow(Build::Info::CI).to receive(:branch_build_package_download_url).and_return('http://example.com')
132+
allow(Build::Info::CI).to receive(:package_download_url).and_return('http://example.com')
133133
end
134134

135135
it 'does not do anything' do
@@ -144,7 +144,7 @@ def deregister_image(parameters)
144144
allow(Build::Check).to receive(:on_tag?).and_return(true)
145145
allow(Build::Check).to receive(:is_auto_deploy?).and_return(true)
146146
allow(Build::Check).to receive(:is_rc_tag?).and_return(false)
147-
allow(Build::Info::CI).to receive(:branch_build_package_download_url).and_return('http://example.com')
147+
allow(Build::Info::CI).to receive(:package_download_url).and_return('http://example.com')
148148
end
149149

150150
it 'does not do anything' do

0 commit comments

Comments
 (0)