Generate per-target jobs for each stage

parent e693a5aa
......@@ -19,7 +19,7 @@ cache:
- make ${CI_JOB_NAME}
artifacts:
untracked: true
renderings:
.renderings:
stage: extras
tags:
- casile
......@@ -30,7 +30,7 @@ renderings:
only:
- master
script: make ${CI_JOB_NAME}
promotionals:
.promotionals:
stage: extras
tags:
- casile
......
......@@ -194,7 +194,7 @@ $(OUTPUTDIR):
# Create per book jobs in the CI config
define ci_setup ?=
yq -M -s -y -e --arg sources "$(strip $(SOURCES))" \
'. + ($$sources | [splits(" ") as $$target | { ($$target + ".pdfs") : { "extends": ".pdfs", "only": [ "master", ("/^"+$$target+"\\/.*/") ], "artifacts": { "paths": [($$target+"*")] } }}]) | add'
'. + ($$sources | [splits(" ") as $$target | [["pdfs", "renderings", "promotionals"][] as $$action | { ($$target+"."+$$action) : { "extends": ("."+$$action), "only": [ "master", ("/^"+$$target+"\\/.*/") ], "artifacts": { "paths": [($$target+"*")] } }}][]]) | add'
endef
require_inputdir := $(or $(strip $(INPUTDIR)),fail)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment