I want to use a python script as input to create stages in jenkins pipeline
test.py
{'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
Example:
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 ?