Search code examples
jenkinsjenkins-pluginshudson-plugins

How to wait for user prompt before triggered build in Jenkins


I have a powershell script I uses for daily releases which works fine. However, I am tasked to run this from Jenkins but I cannot seem to get the parameterised build to work. These are the steps the script takes to do a deployment.

  1. Deploy to PRE_UAT environment.
  2. Test Step 1
    i. If step 1 is successful, ask user if they want to proceed to deploy to UAT
        a. If user response is positive, proceed to deploy to UAT else Stop
    ii. If Step 1 is unsuccessful, Inform User and Stop

The first job runs successfully in Jenkins but the second job which is a parameterised build does not request for user input when triggered by the first build. Only the first job (which is also a parameterised build) prompts for user input.

Thanks


Solution

  • There is no guarantee to have a user (or the 'right' user) in front of jenkins when the second build get triggered. Build parameters will not be requested when a build is not triggered manually.

    I would recommend you look at the promotion plugin, and maybe try to set up a manual promotion step after the first build that will trigger the second one.