[libvirt PATCH 4/5] ci: Add a new integration job template for the upstream QEMU scenario

Daniel P. Berrangé berrange at redhat.com
Wed May 11 14:03:18 UTC 2022


On Fri, May 06, 2022 at 05:35:19PM +0200, Erik Skultety wrote:
> YAML anchors don't work with Shell conditions structures, so we cannot
> simply pull in the QEMU build template conditionally like we do for
> the other anchors. Instead we have to 'subclass' the .integration_tests
> template and inject the QEMU building bits.
> 
> Signed-off-by: Erik Skultety <eskultet at redhat.com>
> ---
>  ci/integration-template.yml | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/ci/integration-template.yml b/ci/integration-template.yml
> index d1934b1469..3bad143622 100644
> --- a/ci/integration-template.yml
> +++ b/ci/integration-template.yml
> @@ -85,3 +85,14 @@ include:
>      - if: '$LIBVIRT_CI_INTEGRATION'
>        when: on_success
>      - when: never
> +
> +
> +# YAML anchors don't work with Shell conditions so we can't use a variable
> +# to conditionally build+install QEMU from source.
> +# Instead, create a new test job template for this scenario.
> +.integration_tests_upstream_qemu:
> +  extends: .integration_tests
> +  before_script:
> +    - !reference [.integration_tests, before_script]
> +    - cd "$SCRATCH_DIR"
> +    - *qemu-build-template

If we're not pull in QEMU's external gitlab config, them presumably
this problem won't exist anymore.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


More information about the libvir-list mailing list