Skip to contentSkip to conversation

ci: Switch to native trigger

PATCH New Jan Kiszka 1 participant 1 message Jan 10, 2023

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH v2 1/1 ci: Switch to native trigger

From: Jan Kiszka <[email protected]>

Now that we are running both pipelines on the same server, we can also make use of native gitlab-ci trigger mechanism. This both obsoletes the need to configure a token and avoids starting a real job on a real runner, just for calling curl.

This also improves the visualization of the two related pipelines in the gitlab UI.

---

Changes in v2:
- keep triggering "next" pipeline of xenomai-image

 .gitlab-ci.yml | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
.gitlab-ci.yml +6 -7
index 4d207dbd61..a80b4dc277 100644
@@ -257,11 +257,10 @@ i386-userland:
 
 trigger-xenomai-images:
   stage: test
-  image: curlimages/curl
-  script:
-    - curl -X POST -F "token=${XENOMAI_IMAGES_TOKEN}"
-           -F "ref=${XENOMAI_IMAGES_BRANCH}"
-           -F "variables[ONLY_RUN]=${CI_COMMIT_BRANCH}"
-           https://source.denx.de/api/v4/projects/479/trigger/pipeline
+  variables:
+    ONLY_RUN: ${CI_COMMIT_BRANCH}
+  trigger:
+    project: xenomai/xenomai-images
+    branch: next
   rules:
-    - if: '$XENOMAI_IMAGES_TOKEN != "" && ($CI_COMMIT_BRANCH == "next" || $CI_COMMIT_BRANCH =~ /stable\/.*/)'
+    - if: '$CI_COMMIT_BRANCH == "next" || $CI_COMMIT_BRANCH =~ /stable\/.*/'
Signature · 1 line
2.35.3