Approve jobs via email notifications
Wish to know if other jobs can be triggered via the success notification of an earlier job, without having to access Jenkins page/link.
I would like to see an Approve or Reject button in the build notifiction & approver upon clicking the required buttons, further connected jobs in Jenkins should start.
DOes Jenkins provide a plugin for such tasks?
If I understand correctly, you are asking if an email (or other type) notification about a build result could contain a button to approve the build of additional jobs. And you would like this to be usable by people who do not have access to Jenkins. I am not clear on whether that means that the approver would not have an account/login to Jenkins. If that is what you mean, then no, at a minimum a user would need to be authorized in Jenkins in order to trigger builds, unless you have configured Jenkins to be open to anonymous users.
If these users will be able to access your Jenkins instance, then there are two possible solutions. For non-Pipeline jobs, you could use the Promoted Builds plugin to allow a user to trigger downstream jobs only after a given upstream job is successful. For Pipeline jobs, you could use 'input' steps in the upstream job to require someone to click an approval button before that job triggers the downstream jobs. In either of these cases, you will need to customize your notification to provide a link back to the parent build for someone to click.
Thanks Owen for your responses.
I am now able to configure Jenkins using the 'Promoted Builds' plugin to setup an approval system for QA Team to approve the jobs based on the success of previous jobs.
The Approve button & email notifications are flowing in properly now.
However, QA TEam has these further queries & wish to know if Jenkins has the in-built capability to handle them :
1. Addition of a 'Reject' button in the approval notification to enable QA teams to reject any build.
2. Ability for QA team to pick the latest build while approving as they would have received multiple notifications for every successful build.
Hi Kunal -
1. I don't think there is any way to have a 'reject' button, because the Promoted Builds plugin does not have a concept of rejection. A build is by default not promoted, unless someone promotes it.
2. I think the closest you could get to this would be to have your notifications link to the main job page, rather than a specific build, so that users can more easily approve the latest one.0
Many Thanks Owen for your responses.
Is there any possibility of incorporating the requirements of QA TEam as listed in my previous comments via any inbuilt Jenkins plugins or will it involve a customization ( by drafting scripts) to accomplish tasks?
Hi Kunal -
You would need to customize this type of workflow using scripts, I think.
If you used Pipeline builds, and 'input' steps to control whether a pipeline proceeds, those have both 'proceed' and 'abort' concepts, which may be more in line with what you want in terms of rejecting something.0
Please sign in to leave a comment.