Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call parameterized Jenkins pipeline from another pipeline

There is any way to trigger a pipeline job from another pipeline with parameters, i already tried

build job: '/myjob', parameters: [string(name: 'param1', value:'val1')], wait: false

also tried

build job: 'myjob', parameters: [string(name: 'param1', value:'val1')], wait: false

and

build job: 'myjob', parameters: [[$class: 'StringParameterValue', name: 'param1', value: 'val1']], wait: false

with no luck, it says:

Item type does not support parameters

like image 429
bitgandtter Avatar asked Dec 28 '17 12:12

bitgandtter


1 Answers

Since the subjob was another multibranch pipeline project i needed to specify the branch i wanted to run so with

build job: 'myjob/master', parameters: [string(name: 'param1', value:'val1')], wait: false

it now works

like image 158
bitgandtter Avatar answered Sep 28 '22 17:09

bitgandtter