Jenkins allows you to parameterize builds, but I can\'t figure out how to actually make use of it:
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