How to use Jenkins parameterized builds? How to use Jenkins parameterized builds? jenkins jenkins

How to use Jenkins parameterized builds?


Whenever the user configures a parameterised build in Jenkins, the parameter name is taken as an environment variable

The user can make use of such parameters using the environment variable.

For example, in your case if packageType is the parameter you want to pass,

then specify the name as packageType and value as war

You can use it in the script you required as %packageType% (for Batch) or $packageType (for shell)

After configuring the job, whenever you click the build now button, Jenkins prompts for the parameter

When you are using file Parameter, the uploaded file will be placed into the working directory