I have written a python script which provides me a output like this as a dictionary,
test.py
:
{'job-name': 'Test1', 'action': 'a', 'targetname': 'x'}
{'job-name': 'Test2', 'action': 'b', 'targetname': 'y'}
{'job-name': 'Test3', 'action': 'c', 'targetname': 'z'}
- How to execute this python script in jenkins pipeline i.e as declarative jenkins pipeline as a stage 1
- 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
stage(Test1)
{
}
stage(Test2)
{
}
stage(Test3)
{
}
How to do this in groovy jenkins pipeline as declarative jenkins pipeline .