I want to use a python script as input to create stages in jenkins pipeline


{'job-name': 'Test1', 'action': 'a', 'targetname': 'x'}
{'job-name': 'Test2', 'action': 'b', 'targetname': 'y'} 
{'job-name': 'Test3', 'action': 'c', 'targetname': 'z'}

The output of the above python script is a dictionary.

How to run this python script in Jenkins pipeline in a stage and how to store the output and use the output to define further stages


stage(Test1) {

stage(Test2) {

stage(Test3) {


Extract only 'value' of a particular 'key' from the output of python script to define stages in Jenkins pipeline.

How to execute it in Jenkins groovy as declarative pipeline ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.