I'm trying to create a Jenkins pipeline job that uses different Jenkinsbuild files depending on the job parameter. Is there a way to load the Jenkins build file during the execution of the job, something like:
node {
stage("Determine build parameter") {
String jenkinsFile = .....
}
// here the Jenkins build file should be loaded
loadSomeHowBuildFile jenkinsFile
// ... and then the pipeline steps defined in the jenkinsFile are executed
}
It would be really great is this will work...