Rohith
Rohith

Reputation: 106

Jenkins Promotion plugin

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.

Upvotes: 1

Views: 460

Answers (1)

Rohith
Rohith

Reputation: 106

This is the answer that I have found for now,

  1. Lets say you have job A and B and promotion plugin is used in job A and once approved job B will be promoted
  2. 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.
  3. 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.
  4. 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

Upvotes: 1

Related Questions