[OS-BUILD PATCH] [redhat] gitlab-ci.yml: trigger bot pipelines on source project & branch name

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

 



From: Patrick Talbert <ptalbert@xxxxxxxxxx>

[redhat] gitlab-ci.yml: trigger bot pipelines on source project & branch name

Currently we trigger the limited srpm-only pipelines based on the
pipeline author username. This works fine when the MR is first opened,
but if anybody needs to trigger a new pipeline on these MRs, then they
are the pipeline author and we get a full set of pipelines instead of
the limited set.

Improve this by instead matching on the MR's source branch project ID
and branch name.

Signed-off-by: Patrick Talbert <ptalbert@xxxxxxxxxx>

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index blahblah..blahblah 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -74,11 +74,11 @@ workflow:
     when: manual
     allow_failure: true
   manual-for-bot: &manual-for-bot
-    if: $GITLAB_USER_LOGIN == "cki-ark-bot"
+    if: $CI_MERGE_REQUEST_SOURCE_PROJECT_ID == "13604247" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME =~ /^configs\/os-build\/.*$/
     when: manual
     allow_failure: true
   srpm-for-bot: &srpm-for-bot
-    if: $GITLAB_USER_LOGIN == "cki-ark-bot"
+    if: $CI_MERGE_REQUEST_SOURCE_PROJECT_ID == "13604247" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME =~ /^configs\/os-build\/.*$/
     when: on_success
     variables:
       skip_build: 'true'

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3399

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