Jenkins User Acceptance step in pipeline

4.1k Views Asked by At

I have a project & pipeline set up within my jenkins instance which looks like this. enter image description here

This can be described as;

  • [Project] - Build the project
  • [Project Deploy Test] - Deploys the project to a test server
  • [Project UA Test] - The User Acceptance step, where the user must manually test and accept
  • [Project Deploy Prod] - Once the user has accepted the UA Test the build is deployed to production

All steps are working well, except the [Project UA Test] step. This step should just be a button or something which the user can manually trigger once he or she is happy with the build.

The question is, How can I configure this step to enforce some user interaction (like clicking a button) before proceeding to the next step?


I have tried making the build parametrised with a Choice Parameter, but I'm not sure I'm doing the right thing.

enter image description here

2

There are 2 best solutions below

0
On BEST ANSWER

Promoted Builds Plugin

https://wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin

You can use the Promoted Builds Plugin which has a manual promotion workflow.

You could have:

  1. [Project] --> [Project Deploy Test] --> [Project UA Test]
  2. [Project UA Test] --(manual promotion)--> [Project Deploy Prod]

Explanation: business as usual until the user acceptance tests are complete. When complete, you can do the manual promotion process. The promotion process can be configured to kick off a downstream build; so in effect your pipeline resume.

Delivery Pipeline Plugin

(note: I haven't played with this plugin, so I'm just guessing)

https://wiki.jenkins-ci.org/display/JENKINS/Delivery+Pipeline+Plugin

The Delivery Pipeline Plugin lets you configure a job to have a postbuild action, which is a manual trigger, and lets you resume your pipeline.

Write your own?

Conceptually, to break your pipeline and have a user "confirm" a build is good, the build needs to provide an action that can be performed after the build is complete. E.g.

  • KeepBuildForEverAction (keep build forever)
  • ClaimBuildAction (claim plugin)
0
On

The Workflow plugin suite supports this use case via an input step.