diff --git a/lib/gitlab/build/info/deploy.rb b/lib/gitlab/build/info/deploy.rb index 6c3c5c10cccf988c426fd7adbc775d2817451845_bGliL2dpdGxhYi9idWlsZC9pbmZvL2RlcGxveS5yYg==..1af75ed4b5d0f0a533f0159d1f85202ff21aecc5_bGliL2dpdGxhYi9idWlsZC9pbmZvL2RlcGxveS5yYg== 100644 --- a/lib/gitlab/build/info/deploy.rb +++ b/lib/gitlab/build/info/deploy.rb @@ -4,7 +4,7 @@ class Info class Deploy OS_MAPPING = { - 'PATCH_DEPLOY_ENVIRONMENT' => 'ubuntu-bionic', + 'PATCH_DEPLOY_ENVIRONMENT' => 'ubuntu-focal', 'RELEASE_DEPLOY_ENVIRONMENT' => 'ubuntu-focal', }.freeze diff --git a/spec/lib/gitlab/tasks/gitlab_com_spec.rb b/spec/lib/gitlab/tasks/gitlab_com_spec.rb index 6c3c5c10cccf988c426fd7adbc775d2817451845_c3BlYy9saWIvZ2l0bGFiL3Rhc2tzL2dpdGxhYl9jb21fc3BlYy5yYg==..1af75ed4b5d0f0a533f0159d1f85202ff21aecc5_c3BlYy9saWIvZ2l0bGFiL3Rhc2tzL2dpdGxhYl9jb21fc3BlYy5yYg== 100644 --- a/spec/lib/gitlab/tasks/gitlab_com_spec.rb +++ b/spec/lib/gitlab/tasks/gitlab_com_spec.rb @@ -47,7 +47,7 @@ context 'with the auto-deploy tag' do before do - allow(Dir).to receive(:glob).with("pkg/**/*.{deb,rpm}").and_return(%w[pkg/ubuntu-bionic/gitlab-ee_16.7.0-ee.0_amd64.deb]) + allow(Dir).to receive(:glob).with("pkg/**/*.{deb,rpm}").and_return(%w[pkg/ubuntu-focal/gitlab-ee_16.7.0-ee.0_amd64.deb]) allow(Build::Check).to receive(:is_auto_deploy?).and_return(true) end @@ -56,37 +56,6 @@ end end - context 'when running on Ubuntu 18.04' do - before do - allow(Dir).to receive(:glob).with("pkg/**/*.{deb,rpm}").and_return(%w[pkg/ubuntu-bionic/gitlab-ee_16.7.0-ee.0_amd64.deb]) - end - - context 'with a release candidate (RC) tag' do - before do - allow(Build::Check).to receive(:is_rc_tag?).and_return(true) - end - - it 'triggers deployment to specified environment' do - expect(DeployerHelper).to receive(:new).with('dummy-token', 'patch-environment', :master) - - Rake::Task['gitlab_com:deployer'].invoke - end - end - - context 'with a stable tag' do - before do - allow(Build::Check).to receive(:is_rc_tag?).and_return(false) - allow(Build::Check).to receive(:is_latest_stable_tag?).and_return(true) - end - - it 'does not trigger deployment' do - expect(DeployerHelper).not_to receive(:new) - - Rake::Task['gitlab_com:deployer'].invoke - end - end - end - context 'when running on Ubuntu 20.04' do before do allow(Dir).to receive(:glob).with("pkg/**/*.{deb,rpm}").and_return(%w[pkg/ubuntu-focal/gitlab-ee_16.7.0-ee.0_amd64.deb]) @@ -97,8 +66,8 @@ allow(Build::Check).to receive(:is_rc_tag?).and_return(true) end - it 'does not trigger deployment' do - expect(DeployerHelper).not_to receive(:new) + it 'triggers deployment to the patch environment' do + expect(DeployerHelper).to receive(:new).with('dummy-token', 'patch-environment', :master) Rake::Task['gitlab_com:deployer'].invoke end @@ -110,7 +79,7 @@ allow(Build::Check).to receive(:is_latest_stable_tag?).and_return(true) end - it 'triggers deployment to specified environment' do + it 'triggers deployment to release environment' do expect(DeployerHelper).to receive(:new).with('dummy-token', 'release-environment', :master) Rake::Task['gitlab_com:deployer'].invoke