diff --git a/lib/gitlab/aws_helper.rb b/lib/gitlab/aws_helper.rb index 2d612ece6579708daf1154a19ed0741ff3f00aa6..1cebe572a93a19167a2c5bcf91aa43fcac152e05 100644 --- a/lib/gitlab/aws_helper.rb +++ b/lib/gitlab/aws_helper.rb @@ -29,7 +29,7 @@ class AWSHelper architecture = 'amd64' end - @download_url = Build::Info::CI.branch_build_package_download_url(job_name: "Ubuntu-20.04", arch: architecture) + @download_url = Build::Info::CI.package_download_url(job_name: "Ubuntu-20.04", arch: architecture) system(*%W[support/packer/packer_ami.sh #{@version} #{@type} #{@download_url} #{Build::Info::CI.job_token} #{@license_file}]) end diff --git a/spec/lib/gitlab/tasks/aws_spec.rb b/spec/lib/gitlab/tasks/aws_spec.rb index 0aefd987f6907f3b8da1e39c56189c24a79c6902..c7d7e90d0d8dcfd0a62e25f54deabc83a327976a 100644 --- a/spec/lib/gitlab/tasks/aws_spec.rb +++ b/spec/lib/gitlab/tasks/aws_spec.rb @@ -49,7 +49,7 @@ RSpec.describe 'aws:ami:create', type: :rake do allow(Build::Check).to receive(:on_tag?).and_return(true) allow(Build::Check).to receive(:is_auto_deploy?).and_return(false) allow(Build::Check).to receive(:is_rc_tag?).and_return(false) - allow(Build::Info::CI).to receive(:branch_build_package_download_url).and_return('http://example.com') + allow(Build::Info::CI).to receive(:package_download_url).and_return('http://example.com') end it 'should identify ce category correctly, if specified' do @@ -129,7 +129,7 @@ RSpec.describe 'aws:ami:create', type: :rake do allow(Build::Check).to receive(:on_tag?).and_return(true) allow(Build::Check).to receive(:is_auto_deploy?).and_return(false) allow(Build::Check).to receive(:is_rc_tag?).and_return(true) - allow(Build::Info::CI).to receive(:branch_build_package_download_url).and_return('http://example.com') + allow(Build::Info::CI).to receive(:package_download_url).and_return('http://example.com') end it 'does not do anything' do @@ -144,7 +144,7 @@ RSpec.describe 'aws:ami:create', type: :rake do allow(Build::Check).to receive(:on_tag?).and_return(true) allow(Build::Check).to receive(:is_auto_deploy?).and_return(true) allow(Build::Check).to receive(:is_rc_tag?).and_return(false) - allow(Build::Info::CI).to receive(:branch_build_package_download_url).and_return('http://example.com') + allow(Build::Info::CI).to receive(:package_download_url).and_return('http://example.com') end it 'does not do anything' do