From: Michael Hofmann <[email protected]>

CI: add ark-latest baseline job to tag cki-gating for successful pipelines

For ark-latest branch HEAD pipelines, add an on_success job after all
the child pipelines that will update the cki-gating branch. This branch
is going to get used for gating the automatic update of CKI
builder-rawhide/eln container images.

Part of https://gitlab.com/cki-project/containers/-/issues/46

Signed-off-by: Michael Hofmann <[email protected]>

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index blahblah..blahblah 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -55,6 +55,10 @@ workflow:
   only-ark-latest-head: &only-ark-latest-head
     if: $CI_COMMIT_BRANCH != "ark-latest" || $CI_PIPELINE_SOURCE !~ /push|web/
     when: never
+  only-ark-latest-head-mr: &only-ark-latest-head-mr
+    if: ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME != "os-build") &&
+        ($CI_COMMIT_BRANCH != "ark-latest" || $CI_PIPELINE_SOURCE !~ 
/push|web/)
+    when: never
   only-cki-gating-head: &only-cki-gating-head
     if: $CI_COMMIT_BRANCH != "cki-gating" || $CI_PIPELINE_SOURCE !~ /pipeline/ 
|| $builder_image !~ $JOB_FILTER
     when: never
@@ -485,3 +489,17 @@ pages:
     - *only-os-build-head-mr
     - *manual-on-mr
     - *on-success
+
+tag-cki-gating:
+  image: quay.io/cki/cki-tools:production
+  stage: deploy
+  script:
+    - mkdir --mode 700 --parents ~/.ssh
+    - echo "${GITLAB_KNOWN_HOSTS}" > ~/.ssh/known_hosts
+    - eval $(ssh-agent -s)
+    - ssh-add -q - <<< "${PRIVATE_KEY}"
+    - git push --force git@${CI_SERVER_HOST}:${CI_PROJECT_PATH}.git 
HEAD:refs/heads/cki-gating
+  rules:
+    - *only-ark-latest-head-mr
+    - *manual-on-mr
+    - *on-success

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2742
_______________________________________________
kernel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
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/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to