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

[PATCH v1] automation: edit pipeline to prevent running non-selected jobs


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: <victorm.lira@xxxxxxx>
  • Date: Tue, 2 Sep 2025 18:49:44 -0700
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rz2eaBwwwCZp211l/RyjUbSt3GFwVa8Bm/HnKDz3ZXc=; b=tixjQu9yyqVhFQpOQM5QuMyjnIjMc9o0B6w9JwnEooVco5UkOSHZVwFCbreyENTC+qFcBNDfVXrsOCp2FvXSNnyA/vZVjJUyNv9BoSRTILkriZu7IFLfw6n9i0dSW5rlSpBlsYZAyivcn4ZoskzR2rqlNPGYeU4MBrf0xdlnVZIU8v+IFTs0zCXNQ+8n9vaKdl2LYOL0n2jCZ6UpLDkwciBMj//LymCJ+0MDQxB9wRonk+JJ3scS+oTrhBR5vztvLsjyeeduKQslPwy/0f0PRCosN6rKnl+K2yKsWYBfVztOZFqiyE7GKRoOppRLo5iqIxllS3mK2Y/Fa4rYRtE/8Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gefUB+dyUt7T333RZVqrL3kGtc8QSLqXyEBT7WrOECZJ8yyhe8gLmeN7MdHX/VoaBXHRj3mZ/2wz0aR7iqqBYMCToKqFdzSijHenczN0NluCbnjx5jz9onpZG1C437CkcloQrVn9IZBnJSfLE6R3Gce8mrOvPPmvujlo54VIHPZbHyM9RwqmHfeVUBBY6UslrMYPuP1vX4Ft4gO9711o6rpuJUsZoC2HfOQT0scdcSqjU4KhP51GBF4oJFT7RuPivhIeI7ytADG6AerM0JGhB33vTq5gBSxO4hNRxKeTYcPzWD9+SglwbdJjGg0s4mMGGr351MRj3vLeYiJ/Pk7Lvw==
  • Cc: Victor Lira <victorm.lira@xxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Wed, 03 Sep 2025 01:50:36 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Victor Lira <victorm.lira@xxxxxxx>

Filtering jobs using the selected jobs regex is missing for
qemu-export/yocto- jobs when running regular pipelines and eclair jobs
when running scheduled pipelines.

Add the missing rules to filter out those jobs, and set a default value
for the selected jobs regex to remove the need to always check if the
variable is empty.

Signed-off-by: Victor Lira <victorm.lira@xxxxxxx>
---
example of the problem:
  - https://gitlab.com/xen-project/people/sstabellini/xen/-/pipelines/2018353899
  - SELECTED_JOBS_ONLY=/alpine-3.18-gcc$/ should produce 1 job only
note:
  - I tested only on sstabellini but the logic should work for hardware/staging
    too
---
Cc: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
Cc: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Cc: Doug Goldstein <cardoe@xxxxxxxxxx>
Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
---
 .gitlab-ci.yml                    | 1 +
 automation/gitlab-ci/analyze.yaml | 5 +++--
 automation/gitlab-ci/build.yaml   | 9 ++++++---
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7974ac4e82..64bed300a6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,6 +2,7 @@ variables:
   XEN_REGISTRY: registry.gitlab.com/xen-project/xen
   SELECTED_JOBS_ONLY:
     description: "Regex to select only some jobs, must be enclosed with /. For 
example /job1|job2/"
+    value: "/.*/"

 workflow:
   name: "$CI_PIPELINE_SCHEDULE_DESCRIPTION"
diff --git a/automation/gitlab-ci/analyze.yaml 
b/automation/gitlab-ci/analyze.yaml
index d507210067..1f58e13cb2 100644
--- a/automation/gitlab-ci/analyze.yaml
+++ b/automation/gitlab-ci/analyze.yaml
@@ -31,8 +31,7 @@
   rules:
     - if: $CI_PIPELINE_SOURCE == "schedule"
       when: never
-    - if: $SELECTED_JOBS_ONLY && $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY
-    - if: $SELECTED_JOBS_ONLY
+    - if: $CI_JOB_NAME !~ $SELECTED_JOBS_ONLY
       when: never
     - if: $WTOKEN && $CI_PROJECT_PATH =~ /^xen-project\/people\/.*$/
       when: manual
@@ -126,6 +125,8 @@ eclair-ARM64:
   rules:
     - if: $CI_PIPELINE_SOURCE != "schedule"
       when: never
+    - if: $CI_JOB_NAME !~ $SELECTED_JOBS_ONLY
+      when: never
     - !reference [.eclair-analysis, rules]

 eclair-x86_64:on-schedule:
diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
index ab5211f77e..b2f96c1fe0 100644
--- a/automation/gitlab-ci/build.yaml
+++ b/automation/gitlab-ci/build.yaml
@@ -226,6 +226,9 @@
       - binaries/
     when: always
   needs: []
+  rules:
+    - if: $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY
+      when: manual

 .yocto-test-arm64:
   extends: .yocto-test
@@ -261,6 +264,9 @@
 .test-jobs-artifact-common:
   stage: build
   needs: []
+  rules:
+    - if: $CI_JOB_NAME =~ $SELECTED_JOBS_ONLY
+      when: on_success

 # Arm test artifacts

@@ -468,20 +474,17 @@ yocto-qemuarm64:
   extends: .yocto-test-arm64
   variables:
     YOCTO_BOARD: qemuarm64
-  when: manual

 yocto-qemuarm:
   extends: .yocto-test-arm64
   variables:
     YOCTO_BOARD: qemuarm
     YOCTO_OUTPUT: --copy-output
-  when: manual

 yocto-qemux86-64:
   extends: .yocto-test-x86-64
   variables:
     YOCTO_BOARD: qemux86-64
-  when: manual

 # Cppcheck analysis jobs

--
2.50.GIT



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.