I have written a python script which provides me a output like this as a dictionary,


{'job-name': 'Test1', 'action': 'a', 'targetname': 'x'}
{'job-name': 'Test2', 'action': 'b', 'targetname': 'y'}
{'job-name': 'Test3', 'action': 'c', 'targetname': 'z'}
  1. How to execute this python script in jenkins pipeline i.e as declarative jenkins pipeline as a stage 1
  2. how to use the output of python script in stage 2 , I want to define the stage names using the output of python script. 1.I want to grep only the Test1 ,Test2 , Test3 as stage name from the dictionary i.e the output of python script





How to do this in groovy jenkins pipeline as declarative jenkins 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.