summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorddavison <ddavison@gitlab.com>2019-07-05 13:52:20 -0700
committerddavison <ddavison@gitlab.com>2019-07-05 13:52:20 -0700
commit8a99aba0b4aaced3fea804f7c48c1fc8ee48e1c4 (patch)
treeb379421974cfba10613ed90e676c838fa5ddae77
parent0cb361fe8f4bd06d9f42e3e7f797631acb4f8d60 (diff)
downloadgitlab-ce-qa-autodevops-disable-jobs.tar.gz
Disable parts of the AutoDevOps Pipelineqa-autodevops-disable-jobs
Jobs Disabled: Code-Quality, DAST, Container-Scanning, Dependency-Scanning, License-Management, SAST Jobs still enabled: Build, Test, Deploy, Browser-Performance-Testing
-rw-r--r--qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb61
1 files changed, 50 insertions, 11 deletions
diff --git a/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb b/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb
index 5ca9ddb6b19..9b567c7f60f 100644
--- a/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb
+++ b/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb
@@ -9,6 +9,52 @@ module QA
Page::Main::Login.perform(&:sign_in_using_credentials)
end
+ def fabricate_ci_variables(project)
+ # Disable code_quality check in Auto DevOps pipeline as it takes
+ # too long and times out the test
+ Resource::CiVariable.fabricate_via_api! do |resource|
+ resource.project = project
+ resource.key = 'CODE_QUALITY_DISABLED'
+ resource.value = '1'
+ resource.masked = false
+ end
+
+ Resource::CiVariable.fabricate_via_api! do |resource|
+ resource.project = project
+ resource.key = 'LICENSE_MANAGEMENT_DISABLED'
+ resource.value = '1'
+ resource.masked = false
+ end
+
+ Resource::CiVariable.fabricate_via_api! do |resource|
+ resource.project = project
+ resource.key = 'SAST_DISABLED'
+ resource.value = '1'
+ resource.masked = false
+ end
+
+ Resource::CiVariable.fabricate_via_api! do |resource|
+ resource.project = project
+ resource.key = 'DEPENDENCY_SCANNING_DISABLED'
+ resource.value = '1'
+ resource.masked = false
+ end
+
+ Resource::CiVariable.fabricate_via_api! do |resource|
+ resource.project = project
+ resource.key = 'CONTAINER_SCANNING_DISABLED'
+ resource.value = '1'
+ resource.masked = false
+ end
+
+ Resource::CiVariable.fabricate_via_api! do |resource|
+ resource.project = project
+ resource.key = 'DAST_DISABLED'
+ resource.value = '1'
+ resource.masked = false
+ end
+ end
+
# Failure issue: https://gitlab.com/gitlab-org/quality/nightly/issues/108
describe 'Auto DevOps support', :orchestrated, :kubernetes, :quarantine do
context 'when rbac is enabled' do
@@ -23,22 +69,15 @@ module QA
it 'runs auto devops' do
login
- @project = Resource::Project.fabricate! do |p|
+ @project = Resource::Project.fabricate_via_api! do |p|
p.name = Runtime::Env.auto_devops_project_name || 'project-with-autodevops'
p.description = 'Project with Auto DevOps'
end
- # Disable code_quality check in Auto DevOps pipeline as it takes
- # too long and times out the test
- Resource::CiVariable.fabricate! do |resource|
- resource.project = @project
- resource.key = 'CODE_QUALITY_DISABLED'
- resource.value = '1'
- resource.masked = false
- end
+ fabricate_ci_variables(@project)
# Set an application secret CI variable (prefixed with K8S_SECRET_)
- Resource::CiVariable.fabricate! do |resource|
+ Resource::CiVariable.fabricate_via_api! do |resource|
resource.project = @project
resource.key = 'K8S_SECRET_OPTIONAL_MESSAGE'
resource.value = 'you_can_see_this_variable'
@@ -112,7 +151,7 @@ module QA
it 'enables AutoDevOps by default' do
login
- project = Resource::Project.fabricate! do |p|
+ project = Resource::Project.fabricate_via_api! do |p|
p.name = Runtime::Env.auto_devops_project_name || 'project-with-autodevops'
p.description = 'Project with AutoDevOps'
end