diff mbox series

[RFC,13/15] gitlab-ci: Switch to dynamically generated pipelines

Message ID 20210418233448.1267991-14-f4bug@amsat.org
State New
Headers show
Series gitlab-ci: Allow forks to use different pipelines than mainstream | expand

Commit Message

Philippe Mathieu-Daudé April 18, 2021, 11:34 p.m. UTC
Switch to the dynamically generated pipeline scheme described in:
https://docs.gitlab.com/ee/ci/parent_child_pipelines.html#dynamic-child-pipelines

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 .gitlab-ci.yml | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 533a7e61339..718c8e004be 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,2 +1,21 @@ 
-include:
-  - local: '/.gitlab-ci.d/qemu-project.yml'
+# Dynamic child pipelines
+# https://docs.gitlab.com/ee/ci/parent_child_pipelines.html#dynamic-child-pipelines
+
+generate-config:
+  stage: build
+  variables:
+    GIT_SUBMODULE_STRATEGY: none
+  artifacts:
+    paths:
+      - generated-config.yml
+  script:
+    - cp .gitlab-ci.d/qemu-project.yml generated-config.yml
+
+generate-pipeline:
+  stage: test
+  variables:
+    GIT_SUBMODULE_STRATEGY: none
+  trigger:
+    include:
+      - artifact: generated-config.yml
+        job: generate-config