mirror of
https://gitlab.durp.info/durfy/ci-includes/yml.git
synced 2026-05-07 16:00:31 -05:00
updates
This commit is contained in:
parent
d99b253208
commit
f8fa4cdbfa
3 changed files with 19 additions and 2 deletions
|
|
@ -33,11 +33,11 @@ cat job-templates.tpl.yml >> job-templates.yml
|
|||
for template in templates/*.tpl.yml
|
||||
do
|
||||
export pipeline=$(basename $template | sed "s/.tpl//")
|
||||
cat $template > pipelines/$pipeline
|
||||
cat $template > jobs/$pipeline
|
||||
./yq -i '(.[] | select(keys | .[] | select(tag == "!!str") | test("^(before_|after_|)script$")) | ."*script") ref $scripts
|
||||
| ($scripts | .. | select(. == "./scripts/*.sh")) |= (load(. + ".yml") | .[] style="")
|
||||
| ($scripts | .[] | select(type == "!reference")) |= ([.] | . style="flow")
|
||||
| ($scripts | select(type == "!!seq")) |= flatten(1)
|
||||
| explode .
|
||||
' pipelines/$pipeline
|
||||
' jobs/$pipeline
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue