qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 9/9] gitlab-ci: Use absolute path and simplify firmware jobs


From: Daniel P . Berrangé
Subject: Re: [PATCH 9/9] gitlab-ci: Use absolute path and simplify firmware jobs
Date: Tue, 25 May 2021 09:56:25 +0100
User-agent: Mutt/2.0.7 (2021-05-04)

On Tue, May 25, 2021 at 10:25:56AM +0200, Philippe Mathieu-Daudé wrote:
> The GitLab 'add job on file changed' feature doesn't work well
> with relative paths: use absolute paths instead.
> 
> Change the 'rules:' section by an 'only:' one which is easier
> to read.

GitLab docs say "rules replaces only/except", so I'm not convinced
we should be going back to the old syntax, especially as that means
some jobs will use 'rules' and some jobs will use 'only'. Consistency
across jobs wins for me and "rules" is much more expressive.



> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  .gitlab-ci.d/edk2.yml    | 11 +++++------
>  .gitlab-ci.d/opensbi.yml | 11 +++++------
>  2 files changed, 10 insertions(+), 12 deletions(-)
> 
> diff --git a/.gitlab-ci.d/edk2.yml b/.gitlab-ci.d/edk2.yml
> index ba7280605c4..f543a10fbe2 100644
> --- a/.gitlab-ci.d/edk2.yml
> +++ b/.gitlab-ci.d/edk2.yml
> @@ -1,10 +1,9 @@
>  docker-edk2:
>   stage: containers
> - rules: # Only run this job when the Dockerfile is modified
> - - changes:
> -   - .gitlab-ci.d/edk2.yml
> -   - .gitlab-ci.d/edk2/Dockerfile
> -   when: always
> + only: # Only run this job when the Dockerfile is modified
> +   changes:
> +   - /.gitlab-ci.d/edk2.yml
> +   - /.gitlab-ci.d/edk2/Dockerfile
>   image: docker:19.03.1
>   services:
>   - docker:19.03.1-dind
> @@ -28,7 +27,7 @@ build-edk2:
>   needs: ['docker-edk2']
>   rules: # Only run this job when ...
>   - changes: # ... roms/edk2/ is modified (submodule updated)
> -   - roms/edk2/*
> +   - /roms/edk2/*
>     when: always
>   - if: '$CI_COMMIT_REF_NAME =~ /^edk2/' # or the branch/tag starts with 
> 'edk2'
>     when: always
> diff --git a/.gitlab-ci.d/opensbi.yml b/.gitlab-ci.d/opensbi.yml
> index f66cd1d9089..7bc96a29366 100644
> --- a/.gitlab-ci.d/opensbi.yml
> +++ b/.gitlab-ci.d/opensbi.yml
> @@ -1,10 +1,9 @@
>  docker-opensbi:
>   stage: containers
> - rules: # Only run this job when the Dockerfile is modified
> - - changes:
> -   - .gitlab-ci.d/opensbi.yml
> -   - .gitlab-ci.d/opensbi/Dockerfile
> -   when: always
> + only: # Only run this job when the Dockerfile is modified
> +   changes:
> +   - /.gitlab-ci.d/opensbi.yml
> +   - /.gitlab-ci.d/opensbi/Dockerfile
>   image: docker:19.03.1
>   services:
>   - docker:19.03.1-dind
> @@ -28,7 +27,7 @@ build-opensbi:
>   needs: ['docker-opensbi']
>   rules: # Only run this job when ...
>   - changes: # ... roms/opensbi/ is modified (submodule updated)
> -   - roms/opensbi/*
> +   - /roms/opensbi/*
>     when: always
>   - if: '$CI_COMMIT_REF_NAME =~ /^opensbi/' # or the branch/tag starts with 
> 'opensbi'
>     when: always
> -- 
> 2.26.3
> 

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 :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]