I'm using jenkins 2.0 with Cloudbees Folder plugin as this allow me to create multiple similar projects. The jobs in each folder can be factored out leaving a top level job that can then call a parameterised job.
I want to place the parameterised job in a Generic folder and then call them from a pipeline script.
So within the jenkins browser I would have 3 folder : ProjA, ProjB and Generic. Under ProjA I have a pipeline job that needs to build a job called TestJib in the generic folder.
My pipeline is like this this :
node('master'){
stage ('Run job'){
build job: "../Generic/TestJob",
parameters: [[$class: 'StringParameterValue', name: 'testa', value: tests]]
}
}
Running this gives : 'ERROR: No parameterized job named ../TestJob'
I have tried many variations on build job: "../Generic/TestJob" but I always get the same error. This works fine if I put the TestJob in the same folder as the pipeline job.
/Generic/TestJob
? – Mouthpiece