diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2020-03-22 12:17:29 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2020-03-23 07:05:28 +0000 |
commit | dedee77d623aa200a5b75f96df7f8191e0b1ef4b (patch) | |
tree | 9b4761091a5910771e71813babd4cc8e602cb028 | |
parent | 5991023a7ce446ebdf0a1c670afc7641f153ba92 (diff) |
gitlab CI: autogenerate the qemu tests for the last version of a distribution
Where want_qemu is set for a distribution, we generate the qemu tests for that
distribution for its last version listed.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | .gitlab-ci/ci.template | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template index 50308fb3..d08548b9 100644 --- a/.gitlab-ci/ci.template +++ b/.gitlab-ci/ci.template @@ -177,9 +177,12 @@ check-commit: # force rebuild if schedule, reuse otherwise - if [[ $CI_PIPELINE_SOURCE == "schedule" ]] ; then export FDO_FORCE_REBUILD=1; fi -fedora:32@qemu-prep: +{# qemu builds are only done for the latest version of any distribution #} +{% for distro in distributions if distro.want_qemu %} +{% set version = "{}".format(distro.versions|last()) %} +{{distro.name}}:{{version}}@qemu-prep: extends: - - .fdo.qemu-build@fedora + - .fdo.qemu-build@{{distro.name}} - .policy - .rebuild_for_schedule stage: prep @@ -187,10 +190,11 @@ fedora:32@qemu-prep: - kvm variables: GIT_STRATEGY: none - FDO_DISTRIBUTION_VERSION: 32 + FDO_DISTRIBUTION_VERSION: {{version}} FDO_DISTRIBUTION_TAG: $QEMU_TAG - FDO_DISTRIBUTION_PACKAGES: $FEDORA_QEMU_RPMS + FDO_DISTRIBUTION_PACKAGES: ${{distro.name.upper()}}_QEMU_RPMS allow_failure: true +{% endfor %} {% for distro in distributions %} {% for version in distro.versions %} @@ -410,20 +414,23 @@ freebsd:11.2@container-clean: when: script_failure -.fedora:32@test-suite-vm: +{# qemu tests are only done for the latest version of any distribution #} +{% for distro in distributions if distro.want_qemu %} +{% set version = "{}".format(distro.versions|last()) %} +.{{distro.name}}:{{version}}@test-suite-vm: extends: - .test-suite-vm variables: - FDO_DISTRIBUTION_VERSION: 32 + FDO_DISTRIBUTION_VERSION: {{version}} FDO_DISTRIBUTION_TAG: $QEMU_TAG needs: - - "fedora:32@qemu-prep" + - "{{distro.name}}:{{version}}@qemu-prep" {% for suite in test_suites %} vm-{{suite.name}}: extends: - - .fedora:32@test-suite-vm + - .{{distro.name}}:{{version}}@test-suite-vm variables: SUITE_NAMES: '{{suite.suites}}' @@ -445,6 +452,7 @@ vm-valgrind-{{suite.name}}: {% endfor %} +{% endfor %} {# for if distro.want_qemu #} .fedora-build@template: extends: |