Skip to main content
Bumped by Community user

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'}

{'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 jenkinsJenkins pipeline in a stage andand how to store the output and use the output to define further stages

exampleExample:

stage(Test1) {

}

stage(Test2) {

} stage(Test3) {

}

stage(Test1) {

}
stage(Test2) {

}
stage(Test3) {

}

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

How to execute it in jenkinsJenkins groovy as declarative pipeline ?

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 ?

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 ?

Source Link
Pavithra
  • 11
  • 2
  • 3

how to create dynamic stages in jenkins pipeline

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 ?