Im quite new to Jenkins, Is there any way I can get all the jobs where approval is pending when using Jenkins promotion plugin? So that I can list all the pending approvals required in UI and ask the approver to approve them by making a http call.
Asked
Active
Viewed 418 times
1 Answers
1
This is the answer that I have found for now,
- Lets say you have job A and B and promotion plugin is used in job A and once approved job B will be promoted
- When you use promotion plugin in Job A, there will be one Approve job gets created. So its basically like Approve job will be the sub job of Job A.
- Now Im setting the same build name for both Job A and Approve Job. So which ever the job is approved, they will have same build name for Job A and Approve Job.
- Now get the history of both the jobs using rest api, compare both and select the excluded list from Job A history, which will be the jobs pending for Approval

Rohith
- 96
- 1
- 1
- 7