summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-24 10:31:56 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-24 10:31:56 +0000
commit159f25da0106c574f2c855b44d5ba4e46822d3a3 (patch)
tree0c0c451079f5a737e3a45461473f45fb5f845921 /spec
parentf1926d2aa6447173a06fee5e0a3141bea27a0d8d (diff)
downloadgitlab-ce-159f25da0106c574f2c855b44d5ba4e46822d3a3.tar.gz
Add latest changes from gitlab-org/gitlab@14-0-stable-ee
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/ci/templates/auto_devops_gitlab_ci_yaml_spec.rb25
1 files changed, 24 insertions, 1 deletions
diff --git a/spec/lib/gitlab/ci/templates/auto_devops_gitlab_ci_yaml_spec.rb b/spec/lib/gitlab/ci/templates/auto_devops_gitlab_ci_yaml_spec.rb
index 6dfcecb853a..b40b4f5645f 100644
--- a/spec/lib/gitlab/ci/templates/auto_devops_gitlab_ci_yaml_spec.rb
+++ b/spec/lib/gitlab/ci/templates/auto_devops_gitlab_ci_yaml_spec.rb
@@ -34,6 +34,7 @@ RSpec.describe 'Auto-DevOps.gitlab-ci.yml' do
expect(build_names).not_to include('canary')
expect(build_names).not_to include('review')
expect(build_names).not_to include(a_string_matching(/rollout \d+%/))
+ expect(build_names).not_to include(a_string_matching(/helm-2to3\d+%/))
end
end
@@ -190,6 +191,17 @@ RSpec.describe 'Auto-DevOps.gitlab-ci.yml' do
expect(build_names).not_to include(a_string_matching(/rollout \d+%/))
end
end
+
+ context 'when MIGRATE_HELM_2TO3=true' do
+ before do
+ create(:ci_variable, project: project, key: 'MIGRATE_HELM_2TO3', value: 'true')
+ end
+
+ it 'includes a helm-2to3:migrate and a helm-2to3:cleanup job' do
+ expect(build_names).to include('production:helm-2to3:migrate')
+ expect(build_names).to include('production:helm-2to3:cleanup')
+ end
+ end
end
context 'outside of default branch' do
@@ -207,12 +219,23 @@ RSpec.describe 'Auto-DevOps.gitlab-ci.yml' do
expect(build_names).to include('review')
expect(build_names).not_to include(a_string_matching(/rollout \d+%/))
end
+
+ context 'when MIGRATE_HELM_2TO3=true' do
+ before do
+ create(:ci_variable, project: project, key: 'MIGRATE_HELM_2TO3', value: 'true')
+ end
+
+ it 'includes a helm-2to3:migrate and a helm-2to3:cleanup job' do
+ expect(build_names).to include('review:helm-2to3:migrate')
+ expect(build_names).to include('review:helm-2to3:cleanup')
+ end
+ end
end
end
end
end
- describe 'build-pack detection' do
+ describe 'buildpack detection' do
using RSpec::Parameterized::TableSyntax
where(:case_name, :files, :variables, :include_build_names, :not_include_build_names) do