any solution?
<code>variables:
SETTING1: "setting1"
SETTING2: "setting2"
stages:
- entry
- trigger_child
entry_job:
tags:
- stg
stage: entry
script:
- mkdir -p artifact
- touch artifact/child-pipeline.yml
- chmod 777 artifact/child-pipeline.yml
- echo "job1.py" > artifact/artifact.env
- echo "job2.py" >> artifact/artifact.env
artifacts:
paths:
- artifact/
trigger_child_pipeline:
tags:
- stg
stage: trigger_child
needs: [entry_job]
script:
- |
declare -a jobs
while IFS= read -r line; do
jobs+=("$line")
done < artifact/artifact.env
for job in "${jobs[@]}"; do
echo "${job}:" >> artifact/child-pipeline.yml
echo " tags:" >> artifact/child-pipeline.yml
echo " - stg" >> artifact/child-pipeline.yml
echo " script:" >> artifact/child-pipeline.yml
echo " - echo 'running ${job}' ${SETTING1} ${SETTING2}" >> artifact/child-pipeline.yml
echo "" >> artifact/child-pipeline.yml
echo "" >> artifact/child-pipeline.yml
done
echo "Generated child-pipeline.yml!!!"
cat artifact/child-pipeline.yml
artifacts:
paths:
- artifact/
trigger_child:
stage: trigger_child
needs: [trigger_child_pipeline]
trigger:
include: artifact/child-pipeline.yml
strategy: depend
</code>
<code>variables:
SETTING1: "setting1"
SETTING2: "setting2"
stages:
- entry
- trigger_child
entry_job:
tags:
- stg
stage: entry
script:
- mkdir -p artifact
- touch artifact/child-pipeline.yml
- chmod 777 artifact/child-pipeline.yml
- echo "job1.py" > artifact/artifact.env
- echo "job2.py" >> artifact/artifact.env
artifacts:
paths:
- artifact/
trigger_child_pipeline:
tags:
- stg
stage: trigger_child
needs: [entry_job]
script:
- |
declare -a jobs
while IFS= read -r line; do
jobs+=("$line")
done < artifact/artifact.env
for job in "${jobs[@]}"; do
echo "${job}:" >> artifact/child-pipeline.yml
echo " tags:" >> artifact/child-pipeline.yml
echo " - stg" >> artifact/child-pipeline.yml
echo " script:" >> artifact/child-pipeline.yml
echo " - echo 'running ${job}' ${SETTING1} ${SETTING2}" >> artifact/child-pipeline.yml
echo "" >> artifact/child-pipeline.yml
echo "" >> artifact/child-pipeline.yml
done
echo "Generated child-pipeline.yml!!!"
cat artifact/child-pipeline.yml
artifacts:
paths:
- artifact/
trigger_child:
stage: trigger_child
needs: [trigger_child_pipeline]
trigger:
include: artifact/child-pipeline.yml
strategy: depend
</code>
variables:
SETTING1: "setting1"
SETTING2: "setting2"
stages:
- entry
- trigger_child
entry_job:
tags:
- stg
stage: entry
script:
- mkdir -p artifact
- touch artifact/child-pipeline.yml
- chmod 777 artifact/child-pipeline.yml
- echo "job1.py" > artifact/artifact.env
- echo "job2.py" >> artifact/artifact.env
artifacts:
paths:
- artifact/
trigger_child_pipeline:
tags:
- stg
stage: trigger_child
needs: [entry_job]
script:
- |
declare -a jobs
while IFS= read -r line; do
jobs+=("$line")
done < artifact/artifact.env
for job in "${jobs[@]}"; do
echo "${job}:" >> artifact/child-pipeline.yml
echo " tags:" >> artifact/child-pipeline.yml
echo " - stg" >> artifact/child-pipeline.yml
echo " script:" >> artifact/child-pipeline.yml
echo " - echo 'running ${job}' ${SETTING1} ${SETTING2}" >> artifact/child-pipeline.yml
echo "" >> artifact/child-pipeline.yml
echo "" >> artifact/child-pipeline.yml
done
echo "Generated child-pipeline.yml!!!"
cat artifact/child-pipeline.yml
artifacts:
paths:
- artifact/
trigger_child:
stage: trigger_child
needs: [trigger_child_pipeline]
trigger:
include: artifact/child-pipeline.yml
strategy: depend