[XEN PATCH v1] automation: edit pipeline to fix blocked status

Victor Lira posted 1 patch 1 day, 3 hours ago
automation/gitlab-ci/build.yaml | 1 +
1 file changed, 1 insertion(+)
[XEN PATCH v1] automation: edit pipeline to fix blocked status
Posted by Victor Lira 1 day, 3 hours ago
The original yocto config had a hidden default of allow_failure: true for the
manual job while the hidden default for rules is false. This causes the
stages with manual jobs to show as blocked.

Set it explicitly to true to avoid the analyze and build stages being shown as
blocked.

Fixes: 485ab1b5db0f358625fafe2df4e41e3ef008aed8
Signed-off-by: Victor Lira <victorm.lira@amd.com>
---
https://gitlab.com/xen-project/people/victormlira/xen/-/pipelines/2212386023
(stuck because of hardware jobs)

Cc: Nicola Vetrini <nicola.vetrini@bugseng.com>
Cc: Doug Goldstein <cardoe@cardoe.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
---
 automation/gitlab-ci/build.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
index e9e04e37d4..f7e032320a 100644
--- a/automation/gitlab-ci/build.yaml
+++ b/automation/gitlab-ci/build.yaml
@@ -229,6 +229,7 @@
   rules:
     - if: $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY
       when: manual
+      allow_failure: true

 .yocto-test-arm64:
   extends: .yocto-test
--
2.51.GIT
Re: [XEN PATCH v1] automation: edit pipeline to fix blocked status
Posted by Stefano Stabellini 1 day, 1 hour ago
On Fri, 12 Dec 2025, Victor Lira wrote:
> The original yocto config had a hidden default of allow_failure: true for the
> manual job while the hidden default for rules is false. This causes the
> stages with manual jobs to show as blocked.
> 
> Set it explicitly to true to avoid the analyze and build stages being shown as
> blocked.
> 
> Fixes: 485ab1b5db0f358625fafe2df4e41e3ef008aed8
> Signed-off-by: Victor Lira <victorm.lira@amd.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
[XEN PATCH v1] automation: edit pipeline to fix hardware jobs running by mistake
Posted by Victor Lira 1 day, 1 hour ago
The selected jobs regex was assumed to be possibly empty in some places
and setting a default value for the regex caused the hardware jobs to
bypass some rules checks.

To fix this, adjust the rules to remove the check for empty and
instead just match the regex.

Fixes: 485ab1b5db0f358625fafe2df4e41e3ef008aed8
Signed-off-by: Victor Lira <victorm.lira@amd.com>
---
https://gitlab.com/xen-project/people/sstabellini/xen/-/pipelines/2212446508
https://gitlab.com/xen-project/people/victormlira/xen/-/pipelines/2212446409
---
 automation/gitlab-ci/build.yaml |  7 ++-----
 automation/gitlab-ci/test.yaml  | 27 +++++++++++----------------
 2 files changed, 13 insertions(+), 21 deletions(-)

diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
index f7e032320a..a6fc55c2d5 100644
--- a/automation/gitlab-ci/build.yaml
+++ b/automation/gitlab-ci/build.yaml
@@ -13,11 +13,8 @@
     when: always
   needs: []
   rules:
-  - if: $SELECTED_JOBS_ONLY && $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY
-    when: always
-  - if: $SELECTED_JOBS_ONLY
-    when: never
-  - when: on_success
+    - if: $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY
+      when: on_success

 .gcc-tmpl:
   variables: &gcc
diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml
index 8d8f62c8d0..338fc99a8a 100644
--- a/automation/gitlab-ci/test.yaml
+++ b/automation/gitlab-ci/test.yaml
@@ -2,10 +2,8 @@
   stage: test
   image: ${XEN_REGISTRY}/${CONTAINER}
   rules:
-  - if: $SELECTED_JOBS_ONLY && $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY
-  - if: $SELECTED_JOBS_ONLY
-    when: never
-  - when: on_success
+  - if: $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY
+    when: on_success

 .arm64-test-needs: &arm64-test-needs
   - project: xen-project/hardware/test-artifacts
@@ -113,10 +111,9 @@
       - '*.dtb'
     when: always
   rules:
-    - if: $SELECTED_JOBS_ONLY && $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY
-    - if: $SELECTED_JOBS_ONLY
-      when: never
-    - if: $XILINX_JOBS == "true" && $CI_COMMIT_REF_PROTECTED == "true"
+    - if: $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY && $XILINX_JOBS == "true"
+          && $CI_COMMIT_REF_PROTECTED == "true"
+      when: on_success
   tags:
     - xilinx

@@ -134,10 +131,9 @@
       - '*.log'
     when: always
   rules:
-    - if: $SELECTED_JOBS_ONLY && $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY
-    - if: $SELECTED_JOBS_ONLY
-      when: never
-    - if: $XILINX_JOBS == "true" && $CI_COMMIT_REF_PROTECTED == "true"
+    - if: $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY && $XILINX_JOBS == "true"
+          && $CI_COMMIT_REF_PROTECTED == "true"
+      when: on_success
   tags:
     - xilinx

@@ -157,10 +153,9 @@
       - '*.log'
     when: always
   rules:
-    - if: $SELECTED_JOBS_ONLY && $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY
-    - if: $SELECTED_JOBS_ONLY
-      when: never
-    - if: $QUBES_JOBS == "true" && $CI_COMMIT_REF_PROTECTED == "true"
+    - if: $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY && $QUBES_JOBS == "true"
+          && $CI_COMMIT_REF_PROTECTED == "true"
+      when: on_success
   tags:
     - qubes-hw2

--
2.51.GIT
Re: [XEN PATCH v1] automation: edit pipeline to fix hardware jobs running by mistake
Posted by Nicola Vetrini 20 hours ago
On 2025-12-13 02:30, Victor Lira wrote:
> The selected jobs regex was assumed to be possibly empty in some places
> and setting a default value for the regex caused the hardware jobs to
> bypass some rules checks.
> 
> To fix this, adjust the rules to remove the check for empty and
> instead just match the regex.
> 
> Fixes: 485ab1b5db0f358625fafe2df4e41e3ef008aed8

nit: the format should be
Fixes: 485ab1b5db0f ("automation: edit pipeline to prevent running 
non-selected jobs")

> Signed-off-by: Victor Lira <victorm.lira@amd.com>
> ---
> https://gitlab.com/xen-project/people/sstabellini/xen/-/pipelines/2212446508
> https://gitlab.com/xen-project/people/victormlira/xen/-/pipelines/2212446409
> ---
>  automation/gitlab-ci/build.yaml |  7 ++-----
>  automation/gitlab-ci/test.yaml  | 27 +++++++++++----------------
>  2 files changed, 13 insertions(+), 21 deletions(-)
> 
> diff --git a/automation/gitlab-ci/build.yaml 
> b/automation/gitlab-ci/build.yaml
> index f7e032320a..a6fc55c2d5 100644
> --- a/automation/gitlab-ci/build.yaml
> +++ b/automation/gitlab-ci/build.yaml
> @@ -13,11 +13,8 @@
>      when: always
>    needs: []
>    rules:
> -  - if: $SELECTED_JOBS_ONLY && $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY
> -    when: always
> -  - if: $SELECTED_JOBS_ONLY
> -    when: never
> -  - when: on_success
> +    - if: $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY
> +      when: on_success
> 
>  .gcc-tmpl:
>    variables: &gcc
> diff --git a/automation/gitlab-ci/test.yaml 
> b/automation/gitlab-ci/test.yaml
> index 8d8f62c8d0..338fc99a8a 100644
> --- a/automation/gitlab-ci/test.yaml
> +++ b/automation/gitlab-ci/test.yaml
> @@ -2,10 +2,8 @@
>    stage: test
>    image: ${XEN_REGISTRY}/${CONTAINER}
>    rules:
> -  - if: $SELECTED_JOBS_ONLY && $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY
> -  - if: $SELECTED_JOBS_ONLY
> -    when: never
> -  - when: on_success
> +  - if: $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY
> +    when: on_success
> 
>  .arm64-test-needs: &arm64-test-needs
>    - project: xen-project/hardware/test-artifacts
> @@ -113,10 +111,9 @@
>        - '*.dtb'
>      when: always
>    rules:
> -    - if: $SELECTED_JOBS_ONLY && $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY
> -    - if: $SELECTED_JOBS_ONLY
> -      when: never
> -    - if: $XILINX_JOBS == "true" && $CI_COMMIT_REF_PROTECTED == "true"
> +    - if: $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY && $XILINX_JOBS == 
> "true"
> +          && $CI_COMMIT_REF_PROTECTED == "true"
> +      when: on_success
>    tags:
>      - xilinx
> 
> @@ -134,10 +131,9 @@
>        - '*.log'
>      when: always
>    rules:
> -    - if: $SELECTED_JOBS_ONLY && $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY
> -    - if: $SELECTED_JOBS_ONLY
> -      when: never
> -    - if: $XILINX_JOBS == "true" && $CI_COMMIT_REF_PROTECTED == "true"
> +    - if: $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY && $XILINX_JOBS == 
> "true"
> +          && $CI_COMMIT_REF_PROTECTED == "true"
> +      when: on_success
>    tags:
>      - xilinx
> 
> @@ -157,10 +153,9 @@
>        - '*.log'
>      when: always
>    rules:
> -    - if: $SELECTED_JOBS_ONLY && $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY
> -    - if: $SELECTED_JOBS_ONLY
> -      when: never
> -    - if: $QUBES_JOBS == "true" && $CI_COMMIT_REF_PROTECTED == "true"
> +    - if: $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY && $QUBES_JOBS == "true"
> +          && $CI_COMMIT_REF_PROTECTED == "true"
> +      when: on_success
>    tags:
>      - qubes-hw2
> 
> --
> 2.51.GIT

-- 
Nicola Vetrini, B.Sc.
Software Engineer
BUGSENG (https://bugseng.com)
LinkedIn: https://www.linkedin.com/in/nicola-vetrini-a42471253
Re: [XEN PATCH v1] automation: edit pipeline to fix hardware jobs running by mistake
Posted by Stefano Stabellini 1 day, 1 hour ago
On Sat, 13 Dec 2025, Victor Lira wrote:
> The selected jobs regex was assumed to be possibly empty in some places
> and setting a default value for the regex caused the hardware jobs to
> bypass some rules checks.
> 
> To fix this, adjust the rules to remove the check for empty and
> instead just match the regex.
> 
> Fixes: 485ab1b5db0f358625fafe2df4e41e3ef008aed8
> Signed-off-by: Victor Lira <victorm.lira@amd.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>