Commit 15a14a9e authored by Dan Davison's avatar Dan Davison

Merge branch 'ml-qa-default-run-untagged-false' into 'master'

Disallow running untagged jobs by default in tests

Closes #34356

See merge request gitlab-org/gitlab!18850
parents 242b62d9 258c847c
...@@ -36,7 +36,6 @@ module QA ...@@ -36,7 +36,6 @@ module QA
runner.tags = tags runner.tags = tags
runner.image = image runner.image = image
runner.config = config if config runner.config = config if config
runner.run_untagged = true
runner.register! runner.register!
end end
end end
......
...@@ -19,6 +19,7 @@ module QA ...@@ -19,6 +19,7 @@ module QA
file_path: '.gitlab/.gitlab-webide.yml', file_path: '.gitlab/.gitlab-webide.yml',
content: <<~YAML content: <<~YAML
terminal: terminal:
tags: ["web-ide"]
script: sleep 60 script: sleep 60
YAML YAML
} }
...@@ -29,7 +30,7 @@ module QA ...@@ -29,7 +30,7 @@ module QA
@runner = Resource::Runner.fabricate_via_api! do |runner| @runner = Resource::Runner.fabricate_via_api! do |runner|
runner.project = project runner.project = project
runner.name = "qa-runner-#{Time.now.to_i}" runner.name = "qa-runner-#{Time.now.to_i}"
runner.tags = %w[qa docker web-ide] runner.tags = %w[web-ide]
runner.image = 'gitlab/gitlab-runner:latest' runner.image = 'gitlab/gitlab-runner:latest'
runner.config = <<~END runner.config = <<~END
concurrent = 1 concurrent = 1
......
...@@ -22,7 +22,7 @@ module QA ...@@ -22,7 +22,7 @@ module QA
runner.project = upstream_project runner.project = upstream_project
runner.token = upstream_project.group.sandbox.runners_token runner.token = upstream_project.group.sandbox.runners_token
runner.name = upstream_project_name runner.name = upstream_project_name
runner.tags = %w[qa test] runner.tags = [upstream_project_name]
end end
end end
...@@ -38,6 +38,7 @@ module QA ...@@ -38,6 +38,7 @@ module QA
job1: job1:
stage: test stage: test
tags: ["#{upstream_project_name}"]
script: echo "done" script: echo "done"
staging: staging:
...@@ -55,6 +56,7 @@ module QA ...@@ -55,6 +56,7 @@ module QA
project_push.file_content = <<~CI project_push.file_content = <<~CI
downstream_job: downstream_job:
stage: test stage: test
tags: ["#{upstream_project_name}"]
script: echo "done" script: echo "done"
CI CI
end end
...@@ -74,7 +76,7 @@ module QA ...@@ -74,7 +76,7 @@ module QA
it 'creates a multi-project pipeline' do it 'creates a multi-project pipeline' do
Page::MergeRequest::Show.perform do |show| Page::MergeRequest::Show.perform do |show|
pipeline_passed = show.retry_until(reload: true, max_attempts: 10, sleep_interval: 5) do pipeline_passed = show.retry_until(reload: true, max_attempts: 20, sleep_interval: 6) do
show.has_content?(/Pipeline #\d+ passed/) show.has_content?(/Pipeline #\d+ passed/)
end end
......
...@@ -21,6 +21,7 @@ module QA ...@@ -21,6 +21,7 @@ module QA
project_push.commit_message = 'Add .gitlab-ci.yml' project_push.commit_message = 'Add .gitlab-ci.yml'
project_push.file_content = <<~EOF project_push.file_content = <<~EOF
test: test:
tags: ["qa"]
script: echo 'OK' script: echo 'OK'
only: only:
- merge_requests - merge_requests
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment