[OS-BUILD PATCHv13 6/11] Extract rules to allow orthogonal configuration

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

 



From: Michael Hofmann <mhofmann@xxxxxxxxxx>

Extract rules to allow orthogonal configuration

Signed-off-by: Michael Hofmann <mhofmann@xxxxxxxxxx>

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index blahblah..blahblah 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -25,6 +25,24 @@ workflow:
       variables:
         REQUESTED_PIPELINE_TYPE: 'ark-ci'
 
+.rules:
+  only-os-build: &only-os-build
+    if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != "os-build"
+    when: never
+  on-success: &on-success
+    when: on_success
+  manual-for-bot: &manual-for-bot
+    if: $CI_COMMIT_AUTHOR =~ /<kernel-team@xxxxxxxxxxxxxxxxx>/
+    when: manual
+    allow_failure: true
+  srpm-for-bot: &srpm-for-bot
+    if: $CI_COMMIT_AUTHOR =~ /<kernel-team@xxxxxxxxxxxxxxxxx>/
+    when: on_success
+    variables:
+      skip_build: 'true'
+      skip_publish: 'true'
+      architectures: ''
+
 .trusted-ark:
   trigger:
     project: redhat/red-hat-ci-tools/kernel/cki-internal-pipelines/cki-trusted-contributors
@@ -41,7 +59,7 @@ workflow:
     skip_test: 'true'
     skip_results: 'true'
 
-.trigger_ark_pipeline:
+.trigger_ark:
   extends: .pipeline
   trigger:
     branch: kernel-ark
@@ -49,19 +67,8 @@ workflow:
     name: kernel-ark
     builder_image: quay.io/cki/builder-rawhide
     run_redhat_self_test: 'true'
-  rules:
-    - if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != "os-build"
-      when: never
-    # automated commits - srpm only
-    - if: $CI_COMMIT_AUTHOR == "Fedora Kernel Team <kernel-team@xxxxxxxxxxxxxxxxx>"
-      when: on_success
-      variables:
-        skip_build: 'true'
-        skip_publish: 'true'
-        architectures: ''
-    - when: on_success
 
-.trigger_eln_pipeline:
+.trigger_eln:
   extends: .pipeline
   trigger:
     branch: eln
@@ -70,24 +77,29 @@ workflow:
     builder_image: quay.io/cki/builder-eln
     native_tools: 'true'
     disttag_override: '.eln'
+
+.srpm_for_bot:
+  rules:
+    - *only-os-build
+    - *srpm-for-bot
+    - *on-success
+
+.manual_for_bot:
   rules:
-    - if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != "os-build"
-      when: never
-    - if: $CI_COMMIT_AUTHOR == "Fedora Kernel Team <kernel-team@xxxxxxxxxxxxxxxxx>"
-      when: manual
-      allow_failure: true
-    - when: on_success
+    - *only-os-build
+    - *manual-for-bot
+    - *on-success
 
 # ARK CI
 ark_merge_request:
-  extends: [.trusted-ark, .merge_request, .trigger_ark_pipeline]
+  extends: [.trusted-ark, .merge_request, .trigger_ark, .srpm_for_bot]
   variables:
     rpmbuild_with: up
     package_name: kernel
     architectures: x86_64 aarch64 s390x ppc64le
 
 ark_debug_merge_request:
-  extends: [.trusted-ark, .merge_request, .trigger_ark_pipeline]
+  extends: [.trusted-ark, .merge_request, .trigger_ark, .manual_for_bot]
   variables:
     rpmbuild_with: up dbgonly
     package_name: kernel-debug
@@ -95,42 +107,42 @@ ark_debug_merge_request:
 
 # ELN CI
 eln_merge_request:
-  extends: [.trusted-ark, .merge_request, .trigger_eln_pipeline]
+  extends: [.trusted-ark, .merge_request, .trigger_eln, .manual_for_bot]
   variables:
     rpmbuild_with: up
     package_name: kernel
     architectures: x86_64 aarch64 s390x ppc64le
 
 eln_debug_merge_request:
-  extends: [.trusted-ark, .merge_request, .trigger_eln_pipeline]
+  extends: [.trusted-ark, .merge_request, .trigger_eln, .manual_for_bot]
   variables:
     rpmbuild_with: up dbgonly
     package_name: kernel-debug
     architectures: x86_64 aarch64 s390x ppc64le
 
 eln_realtime_merge_request:
-  extends: [.trusted-ark, .merge_request, .trigger_eln_pipeline]
+  extends: [.trusted-ark, .merge_request, .trigger_eln, .manual_for_bot]
   variables:
     rpmbuild_with: realtime
     package_name: kernel-rt
     architectures: x86_64
 
 eln_realtime_debug_merge_request:
-  extends: [.trusted-ark, .merge_request, .trigger_eln_pipeline]
+  extends: [.trusted-ark, .merge_request, .trigger_eln, .manual_for_bot]
   variables:
     rpmbuild_with: realtime dbgonly
     package_name: kernel-rt-debug
     architectures: x86_64
 
 eln_64k_merge_request:
-  extends: [.trusted-ark, .merge_request, .trigger_eln_pipeline]
+  extends: [.trusted-ark, .merge_request, .trigger_eln, .manual_for_bot]
   variables:
     rpmbuild_with: arm64_64k
     package_name: kernel-64k
     architectures: aarch64
 
 eln_64k_debug_merge_request:
-  extends: [.trusted-ark, .merge_request, .trigger_eln_pipeline]
+  extends: [.trusted-ark, .merge_request, .trigger_eln, .manual_for_bot]
   variables:
     rpmbuild_with: arm64_64k dbgonly
     package_name: kernel-64k-debug

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2575
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux