On Thu, Nov 13, 2025 at 10:25:22AM +0000, Alex Bennée wrote:
> In addition to not being triggered by schedule we should follow the
> same rules about QEMU_CI. One day we may figure out how to fold the
> custom runner rules into the .base_job_template but today is not that
> day.
> 
> Signed-off-by: Alex Bennée <[email protected]>
> ---
>  .gitlab-ci.d/custom-runners/debian-13-ppc64le.yml    | 2 +-
>  .gitlab-ci.d/custom-runners/ubuntu-24.04-aarch64.yml | 2 +-
>  .gitlab-ci.d/custom-runners/ubuntu-24.04-s390x.yml   | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/.gitlab-ci.d/custom-runners/debian-13-ppc64le.yml 
> b/.gitlab-ci.d/custom-runners/debian-13-ppc64le.yml
> index 6492d013de8..be73c14b95e 100644
> --- a/.gitlab-ci.d/custom-runners/debian-13-ppc64le.yml
> +++ b/.gitlab-ci.d/custom-runners/debian-13-ppc64le.yml
> @@ -11,7 +11,7 @@
>      - ppc64le
>    rules:
>      - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ 
> /^staging/'
> -    - if: '$PPC64LE_RUNNER_AVAILABLE && $CI_PIPELINE_SOURCE != "schedule"'
> +    - if: '$PPC64LE_RUNNER_AVAILABLE && $CI_PIPELINE_SOURCE != "schedule" && 
> $QEMU_CI'
>    before_script:
>      - source scripts/ci/gitlab-ci-section
>      - section_start setup "Pre-script setup"
> diff --git a/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch64.yml 
> b/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch64.yml
> index c8adb8171c0..7a30a18d0bc 100644
> --- a/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch64.yml
> +++ b/.gitlab-ci.d/custom-runners/ubuntu-24.04-aarch64.yml
> @@ -11,7 +11,7 @@
>      - aarch64
>    rules:
>      - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ 
> /^staging/'
> -    - if: '$AARCH64_RUNNER_AVAILABLE && $CI_PIPELINE_SOURCE != "schedule"'
> +    - if: '$AARCH64_RUNNER_AVAILABLE && $CI_PIPELINE_SOURCE != "schedule" && 
> $QEMU_CI'
>    before_script:
>      - source scripts/ci/gitlab-ci-section
>      - section_start setup "Pre-script setup"
> diff --git a/.gitlab-ci.d/custom-runners/ubuntu-24.04-s390x.yml 
> b/.gitlab-ci.d/custom-runners/ubuntu-24.04-s390x.yml
> index fcb49ae884d..c30816a806e 100644
> --- a/.gitlab-ci.d/custom-runners/ubuntu-24.04-s390x.yml
> +++ b/.gitlab-ci.d/custom-runners/ubuntu-24.04-s390x.yml
> @@ -11,7 +11,7 @@
>      - s390x
>    rules:
>      - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ 
> /^staging/'

As a separate commit this should be changed to

   - if: '$CI_PROJECT_NAMESPACE == $QEMU_CI_UPSTREAM && $CI_COMMIT_BRANCH =~ 
/^staging/'

$QEMU_CI_UPSTREAM defaults to 'qemu-project' but devs can override it
to point to their own repo, in order to test operation as if it were
in upstream.

> -    - if: '$S390X_RUNNER_AVAILABLE && $CI_PIPELINE_SOURCE != "schedule"'
> +    - if: '$S390X_RUNNER_AVAILABLE && $CI_PIPELINE_SOURCE != "schedule" && 
> $QEMU_CI'
>    before_script:
>      - source scripts/ci/gitlab-ci-section
>      - section_start setup "Pre-script setup"

This means the job will never get run by default in upstream context
unless QEMU_CI is set. This is different from base.yml where in upstream
context, jobs all run by default.

ie in upstream we implicitly have QEMU_CI==2 by default, while in
forks we implicitly have QEMU_CI==0 / unset.

To get this matching better requires:

 rules:
   - if: '$CI_PROJECT_NAMESPACE == $QEMU_CI_UPSTREAM && $CI_COMMIT_BRANCH =~ 
/^staging/'
   - if: '$QEMU_CI != "1" && $QEMU_CI != "2" && $CI_PROJECT_NAMESPACE != 
$QEMU_CI_UPSTREAM'
     when: never
   - if: '$S390X_RUNNER_AVAILABLE && $CI_PIPELINE_SOURCE != "schedule" && 
$QEMU_CI == "1"'
     when: manual
   - if: '$S390X_RUNNER_AVAILABLE && $CI_PIPELINE_SOURCE != "schedule"'


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


Reply via email to