How to use Jenkins parameterized builds?

Jenkins allows you to parameterize builds, but I can’t figure out how to actually make use of it:

enter image description here

  • How do I check out an SVN project into Eclipse as a Java project?
  • Custom git push ant task wont work in JGit
  • What to do when your ant build process craps on your Version Control
  • Missing WLInitializationPlugin when app is started worklight 6.2
  • Git Checkout Particular Branch
  • Managing releases on github
  • Say I would normally kick my Ant build off from the command-line like so:

    ant -buildfile /path/to/my/build.xml -DpackageType=jar package
    

    This would invoke the build.xml‘s package target, and make a property named packageType available to it, with a value of jar.

    I’m assuming that in the screenshot above, the Name field is where I would specify packageType, but what about the value?

    1. If Jenkins wants me to specify a Default Value for the property, then where do I specify the value that my project is using? For instance, I might want a Default Value of war, but have this Jenkins job pass in a value of jar (to override the default).
    2. Also, what does Jenkins mean by “…allows the user to save typing the actual value.” Which user? Where would you type the value anyways?

    Thanks in advance!

  • github releases in relation to branching, as used by jitpack
  • Is there any reason NOT to use git-masquerading-as-cvs as an upgrade to cvs?
  • Include GIT installation in a Java app
  • How to set $_SERVER variables when running phpunit tests through Jenkins
  • Jenkins sonar check failure: Caused by: java.lang.ClassNotFoundException: org.sonar.api.checks.NoSonarFilter
  • How remove duplicate of the same dependiencies sources in dependent projects
  • One Solution collect form web for “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

    Git Baby is a git and github fan, let's start git clone.