Update the Runner Ops to use printf and newlines
What does this MR do and why?
A test was introduced to test versioned GitLab instances against a test project that exercised (initially Dependency Scanning) Secure analyzers.
It was noticed that the runner was not picking up jobs, this was because the config was not being set properly. This MR fixes that, being consistent in syntax from similar code in the GitLab project for the QA runner kicked off by our RSpec E2E tests ( https://gitlab.com/gitlab-org/gitlab/blob/master/qa/qa/service/docker_run/gitlab_runner.rb#L108-113 )
How to set up and validate locally
With an EE_LICENSE env variable set:
GITLAB_LICENSE_MODE=test PROJECT_URL='https://gitlab.com/gitlab-org/quality/ci/secure-testing/secure-matrix-test.git' PROJECT_NAME='secure-matrix-test' ./exe/gitlab-qa Test::Instance::SecureVersion gitlab/gitlab-ee:16.2.0-ee.0The last step of checking pipeline status should not stick (it may take a few minutes)
# wait for the pipeline to complete
loop do
latest_pipeline.reload
break if latest_pipeline.complete?
sleep 1
end
puts latest_pipeline.status
\"
"`
...
successAlso note the pipeline at https://gitlab.com/gitlab-org/quality/ci/secure-testing/version-matrix/-/pipelines/1691374672 where this branch is temporarily used
def pipeline_script
["echo \"source 'https://rubygems.org'\ngem 'gitlab-qa', git: 'https://gitlab.com/gitlab-org/gitlab-qa.git', branch: 'runner_ops_update_printf'\" > Gemfile",
'bundle install',
"PROJECT_URL='https://gitlab.com/gitlab-org/quality/ci/secure-testing/secure-matrix-test.git' PROJECT_NAME='secure-matrix-test' bundle exec gitlab-qa Test::Instance::SecureVersion #{image_name}"]
end
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
- Commits include
Changelog:trailer - I have evaluated the MR acceptance checklist for this MR.