One openQA template to rule them all, and no shell scripts
With !45 (merged) we now have 3 Gitlab CI scripts that start openQA tests:
- one in
templates/gnomeos-test-sysext.yml
in this repo - one in openqa-tests.git test-s3-image job
- one in gnome-build-meta.git test-s3-image job (which is slightly different as it clones openqa-tests.git into gnome-build-meta.git)
A related issue is that to use templates/gnomeos-test-sysext.yml
, one has to duplicate six scripts into the component repo:
-
openqa/utils/fetch_test_media.sh
-- this is a tiny wrapper aroundcurl
-
openqa/utils/expand_disk.sh
-- this is a small wrapper arounddd
-
openqa/utils/setup_worker.sh
-- this creates the/etc/openqa/workers.ini
file with a unique WORKER_CLASS, so we can have transient workers -
openqa/utils/start_all_jobs.sh
-- this usesopenqa-cli
to submit a job, and parses the JSON response to a temporary file, so the main script can poll the status of each job -
openqa/utils/wait_for_job.sh
-- this usesopenqa-cli
to poll the status of each job in a loop, exiting with success/failure appropriately -
openqa/utils/openqa_junit_report.py
-- use the openQA REST API to get the results for each job and generates a JUnit XML test report, to integrate with Gitlab's test results view
Ideas for removing these:
-
openqa/utils/fetch_test_media.sh
-- just use curl directly in the CI template -
openqa/utils/expand_disk.sh
-- usedd
directly -
openqa/utils/setup_worker.sh
-- just write/etc/openqa/workers.ini
directly in the CI template. (Or come up with a better solution for this upstream -- see https://github.com/os-autoinst/linux-qa/issues/2) -
openqa/utils/start_all_jobs.sh
-- extend theopenqa-cli
tool to write the job IDs in the format we want -
openqa/utils/wait_for_job.sh
-- add a subcommand ofopenqa-cli
to do what we need -
openqa/utils/openqa_junit_report.py
-- add the script upstream, or add a subcommand ofopenqa-cli
to do what we need
One issue of moving functionality back into the .gitlab-ci.yml is that it can be harder to test in isolation. https://github.com/firecow/gitlab-ci-local might help there.
Edited by Sam Thursfield