yea, I don’t like builds triggering builds, but it is a technique some people use for reusable code.
For 2 I was just thinking of making a script called generate_pipeline.sh or something
echo "pipeline {"
echo " stages { stage('first stage') { steps { echo hi } } }"
echo "}"
then /system/generate_pipelines.sh > Jenkinsfile
That way you don’t have to have complex dynamic steps in your pipeline, but you do have the declarative pipeline committed, and then when you want to make changes to the pipeline, just re-run the script.
Not saying its a good idea, just another option.
Make sure you check out the great work timja has been doing on Blue Ocean but in classic UI - #16 by timja It doesn’t fix your problem, but as blueocean really isn’t getting updates its good to know about the alternatives