x
login Signup

How do I call a Flow pipeline from a Jenkins pipeline

The documentation https://wiki.jenkins.io/display/JENKINS/ElectricFlow+Plugin shows an example of a call of a Flow pipeline from a jenkins job but not from a Jenkins pipeline. What code should be used?

avatar image By lrochette 5.8k asked Jun 27 at 08:15 PM
more ▼
(comments are locked)
10|750 characters needed characters left

1 answer: sort voted first

The code for the pipeline is as follow for a flow pipeline with 2 parameters: param1 and param2

 step([$class: 'ElectricFlowPipelinePublisher', 
         configuration: 'EFlow',
         projectName : 'my_flow_project',
         pipelineName : 'jenkinsTest',
         addParam : '''{
                     "parameters":[
                         {"parameterName": "param1", "parameterValue": "12345"},
                         {"parameterName": "param2", "parameterValue": "string2"}
                      ]
         }'''
 ])

Of course you need to create the Flow configuration on the Jenkins server as described in the documentation.

avatar image By lrochette 5.8k answered Jun 27 at 08:18 PM
more ▼
(comments are locked)
10|750 characters needed characters left
Your answer
toggle preview:

Up to 8 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.