Question

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

Était-ce utile?

La 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.

Autres conseils

You can pass a parameter from the first step to the next, and so on,
but it will not give the flow you are aiming at. (the user can't know at the beginning of the build if he will want to promote it or not).

Suggest you check the promotion plugin.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top