edit:
according to Andrew Bayer you're not supposed to inject declarative pipelines in to others. Support might come for it in the future but not might not come at all.
I'm currently trying to start a pipeline within a pipeline but I'm wondering what I need to do to make it work. The documentation on the jenkins webpage says that if the new job or pipeline is in the same folder as the first one you can call it from either direct name or absolute path. I've tried all different ways, currently I'm trying absolute path to a file I just checked exists one second earlier but it says that it doesn't exist.
I wonder what the correct way to link different pipelines together are.
steps {
echo "hello ${env.WORKSPACE}"
sh "ls ${env.WORKSPACE}"
sh "ls ${env.WORKSPACE}/jenkins"
build(job: "${env.WORKSPACE}/jenkins/css-core-pipeline", parameters: [[$class: 'StringParameterValue', name: 'param1', value: "$pass1" ]])
}
[Pipeline] echo
hello /home/jenkins/workspace/hellopipeline
[Pipeline] sh
[hellopipeline] Running shell script
.+ ls /home/jenkins/workspace/hellopipeline
README.md
.
.
.
jenkins
[Pipeline] sh
[hellopipeline] Running shell script
.+ ls /home/jenkins/workspace/hellopipeline/jenkins
css-ce-pipeline
css-core-pipeline
css-dev-pipeline
css-prod-pipeline
manual.md
.
.
.
ERROR: No item named /home/jenkins/workspace/hellopipeline/jenkins/css-core-pipeline found
Finished: FAILURE