Skip to content
Snippets Groups Projects
Commit 1af75ed4b5d0 authored by John Skarbek's avatar John Skarbek
Browse files

Use Ubuntu 20.04 for patch deploys

parent 6c3c5c10cccf
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment