Avadh
Avadh

Reputation: 61

Manual Approval in Jenkins Job

We have a Jenkins Job which runs automated test scripts. Now we would like to have another job triggered after successful completion of this job whose only task is to get a manual approval or rejection from QA team for manual validation of the new build. If QA rejects the job the pipeline should stop and if QA approves the next job in the pipeline should trigger. Any pointers to implement this case?

Upvotes: 2

Views: 8928

Answers (2)

Jesse Glick
Jesse Glick

Reputation: 25451

Jenkins Workflow (mentioned in your tag, perhaps unintentionally?) is designed for this kind of thing. You can write the whole pipeline in one job with a short script.

Upvotes: 0

Eytan Avisror
Eytan Avisror

Reputation: 2970

Try this workflow:

  • Job A runs tests. if failed email is sent to DevTeam.
  • If Job A succeeds, Job B is triggered.
  • Job B sends email to QA team that contains:
  • "Tests have passed, if you wish to approve click here" - the link will contain a trigger for Job C.
  • Job C needs to be configured to be able to run remotely. Look into using: "Trigger builds remotely (e.g., from scripts)" under job's "Build Triggers". you will be provided with a link similar to "/job/Job%20C/build?token=MY_TOKEN" which you can then use as a link in Job B's email.

Upvotes: 3

Related Questions