Parameterized Build

Skip to end of metadata
Go to start of metadata

Sometimes, it is useful/necessary to have your builds take several "parameters." Consider the following use case:

  • You set up a test job on Jenkins, and it accepts a distribution bundle as a parameter and perform tests against it. You want to have developers do local builds and let them submit builds for test execution on Jenkins. In such a case, your parameter is a zip file that contains a distribution.
  • Your test suite takes so much time to run that in normal execution you can't afford to run the entire test cycle. So you want to control the portion of the test to be executed. In such a case, your parameter is perhaps a string token that indicates that test suite to be run.

The parameter are available as environment parameters. So e.g. a shell ($FOO, %FOO%) or Ant ( ${env.FOO} ) can access these values.

Defining Parameters

First, you need to define parameters for your job by selecting "This build is parameterized", then using the drop-down button to add as many parameters as you need.

There are different parameter types available, and it is extensible, too. The way parameters take effect is also different depending on the parameter type you choose.

String parameter

String parameters are exposed as environment variables of the same name. Therefore, a builder, like Ant and Shell, can use the parameters. Continuing the above example, the following is a simple example:

  1. Reference parameter by name in builder. I'm using the "env" command to show the variable, followed by an echo statement to demonstrate referencing the value:
  2. Run build and observe output toward the bottom of the log (some vars removed for security and brevity):
    started
    [workspace] $ /bin/sh -xe /opt/apache-tomcat-6.0.14/temp/jenkins20854.sh
    + env
    BAR=bat
    ...
    [workspace] $ /bin/sh -xe /opt/apache-tomcat-6.0.14/temp/jenkins20855.sh
    + echo the value of bar is bat
    the value of bar is bat
    finished: SUCCESS
    

Ant works equally well. In the Properties section of the Ant builder, define a build property like:

my.prop=${env.BAR}

Note that because of the case sensitivity difference of environment variables in Windows and Unix, all the environment variables added by parameters are in upper case.

File parameter

File parameter allows a build to accept a file, to be submitted by the user when scheduling a new build. The file will be placed inside the workspace at the known location after the check-out/update is done, so that your build scripts can use this file.

Define Custom Parameter Types

A plugin can define custom parameter types. See ParameterDefinition for the starting point.

Launching a build with parameters

Parameters are Case Sensitive!
When passing parameters through the URL, casing is important! For example token=TOKEN&MESSAGE=yo will not work if the job defines the parameter as Message.
  • A build can be started just by POSTing to
http://server/job/myjob/buildWithParameters?PARAMETER=Value
  • All parameters need to be properly URL-escaped. To use with wget, quote the URL on the command line too.
  • The parameter delay=0sec can be added to start the build immediately.
  • To use a Run Parameter, the value should be in the format jobname#buildNumber (eg. "&MyRunParam=foo-job%2399" for foo-job #99)
  • If you are using an authorization token to trigger the builds (Job -> Configure -> 'Build Triggers' -> 'Trigger builds remotely (e.g., from scripts)'), you can access:
    http://server/job/myjob/buildWithParameters?token=TOKEN&PARAMETER=Value

    (Note that the & will need to escaped, or the whole URL quoted, if using a Unix shell script.)

Limitations

Currently the following are the known problems:

  • When build triggers are used to start a build, there's no way to pass parameters. This includes SCM polling, downstream builds, and periodic builds. Instead, the specified default values will be used for string, boolean and choice parameters.

Open issues

How can i pass the configured parameter to the maven execution of the build?
E.g. I've got a maven build and a specific profile should be given as a String parameter in the Jenkins build.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Aug 19, 2008

    Cees Bos says:

    How can I trigger a build based on a url? This is the url without a parameter: ...

    How can I trigger a build based on a url?

    This is the url without a parameter: http://localhost/hudson/job/jobname/build?delay=0sec (http://localhost/hudson/job/jobname/build)

    Can I add parametername=value? I tried it, but it didn't work. In this example http://localhost/hudson/job/jobname/build?delay=0sec&BAR=FOO\\

    1. Feb 27, 2009

      Thomas Guieu says:

      It works for me, if you "download" the URL with a WGET-like, don't forget to quo...

      It works for me, if you "download" the URL with a WGET-like, don't forget to quote this URL.

  2. Sep 15, 2008

    Gregoire Henry says:

    Windows Users : use my.prop=%BAR%  in ant properties as value expansion see...

    Windows Users : use my.prop=%BAR%  in ant properties as value expansion seems to be made by the OS ......

    1. Dec 09, 2008

      Stefan Baramov says:

      Linux Users: my.prop=$BAR since the same applies for Linux users as well. ...

      Linux Users:

      my.prop=$BAR
      

      since the same applies for Linux users as well. Or at least in the 1.262 version.

  3. Sep 17, 2008

    joelfire - says:

    It seems that if a parameter is in a downstream job, the parameter is not set. I...

    It seems that if a parameter is in a downstream job, the parameter is not set.
    It would be useful to pass parameters to downstream jobs, if they share the same named parameters.

    1. Oct 13, 2008

      Yoon Kyung Koo says:

      I also think so. I need to build each svn branches, and there's no easy way to ...

      I also think so.

      I need to build each svn branches, and there's no easy way to build downstream the branched modules.

  4. Sep 18, 2008

    lukas rytz says:

    A question related to the one by Cees Bos: is it possible to specify build param...

    A question related to the one by Cees Bos: is it possible to specify build parameters when using the "build periodically" feature?

    There is no other way to parametrize a build, right?

  5. Jan 07, 2009

    ricardo_go - says:

    I believe that it would be very useful if the Build Parameters would also work f...

    I believe that it would be very useful if the Build Parameters would also work for multi-configuration projects.

  6. Feb 10, 2009

    eagleigor - says:

    It would be great to be able to add not only parameter name and value but also s...

    It would be great to be able to add not only parameter name and value but also specify some description as well, so when user click on ''Build Now" button the parameterized page would give more helpful info about required parameters. 
    Also in my company we are using mostly boolean based parameters, it would be very useful to add one more type of parameters - Boolean (as a checkbox).

  7. Mar 31, 2009

    Sathish Sathyan says:

    Is there a way where I can pass multiple default values to a single parameter an...

    Is there a way where I can pass multiple default values to a single parameter and then select the value of the parameter from a dropdown (which has the default values), and then run the build?

    Seems to be a nice feature to have

  8. May 18, 2009

    Lars Skjærlund says:

    Is there a way to access the parameters from the project configuration page? If...

    Is there a way to access the parameters from the project configuration page?

    If I have a parameter called "Release" holding the release number, it might want to create a custom workspace called "C:\Hudson\Release-$Release" - but this doesn't work. It would be nice to have access to the parameters for use in the project configuration as well.

    BTW: Checking out "<long path>/release/$Release" from Subversion does work, though - very nice, indeed.

  9. Jul 13, 2009

    jvizueta says:

    How can these parameters be accessed from groovy? I'm trying to set parameters a...

    How can these parameters be accessed from groovy? I'm trying to set parameters and use them from this plugin: http://techkriti.wordpress.com/2008/08/30/using-groovy-with-hudson-to-send-rich-text-email/

    But I don't get to find the java code in Hudson where it stores a project parameters:

    Here is the code where I'm looking: http://kickjava.com/src/hudson/model/AbstractProject.java.htm

  10. Jul 15, 2009

    Yun Zhi Lin says:

    Is it possible to make these parameter values available in all fields outside of...

    Is it possible to make these parameter values available in all fields outside of the build step? In a custom parametrized build I would like to specify a particular CVS/SVN TAG to build against or a particular Ant TASK to call, however I can't use Parameters for any of these fields.

    The only way would be to call both Ant, CVS/SVN via commandline using Window Batch Command or Execution Shell and passing in the Parameters there. If these Parameters could be recognized in all the standards fields it would be truly awesome. But I guess this is a problem that applies to all Environment Variables in general.

  11. Sep 13, 2009

    srinivas M says:

    Is there a possibility to populate the choices dynamically in the dropdown ...

    Is there a possibility to populate the choices dynamically in the dropdown menu of Choice parameter?this will be very helpful for users to select the value for parameter from available options.

  12. Sep 30, 2009

    clecompt - says:

    I was able to use the parametrized values in the build and SCM setup for a proje...

    I was able to use the parametrized values in the build and SCM setup for a project using the ${PARAMETER NAME}

    syntax.  It's not entirely clear from what's stated above as to what/where/how the parameters are valid, only that they are exposed as environment variables but maybe I missed something.  I'm a bit new to Hudson...

    1. Oct 07, 2009

      Pascal Gelinas says:

      It would be great if we could use the parameters anywhere in the project configu...

      It would be great if we could use the parameters anywhere in the project configuration page. I've tried using them in some report plugins (JUnit, checkstyle and the like) with no luck... I've tried $parameterName, ${parameter name} and ${PARAMETER NAME} and none worked...

  13. Oct 01, 2009

    Alexander Shusherov says:

    There is a useful feature in "Trigger builds remotely" section: "Optionally appe...

    There is a useful feature in "Trigger builds remotely" section: "Optionally append &cause=Cause+Text to provide text that will be included in the recorded build cause."

    Unfortunately it does not work with parametrized builds (no build cause is recorded). Could you please fix it? Or is there another way to make some comments [encoded into url] viewable on the page with build details?

    Thanks

  14. Oct 02, 2009

    Mikael Monroy says:

    It doesn't seem to work with Nant The keywords ${PARAMETER NAME} or $ {env.PARA...
    It doesn't seem to work with Nant
    The keywords ${PARAMETER NAME} or $ {env.PARAMETER NAME} are not recognized
    
    1. Oct 30, 2009

      Shalmali Mahajan says:

      The case of the parameter name has to match with that of the declared name every...

      The case of the parameter name has to match with that of the declared name everywhere where it is accessed.

      In Ant, I could access the parameter only when it was not preceded by 'env'.

  15. Nov 11, 2009

    nick chang says:

    Is there a way to post fileparameters using the buildWithParameters remote trigg...

    Is there a way to post fileparameters using the buildWithParameters remote trigger path?   Whenever I try encoding the parameters using multipart via python ( http://code.activestate.com/recipes/146306/ ), i get internal server errors.

  16. Nov 15, 2009

    xu wei says:

    I want to setup a staged build, e.g. project-unit, project-integration, project-...

    I want to setup a staged build, e.g. project-unit, project-integration, project-deploy-QA, project-deploy-staging, project-deploy-production.
    I want to make sure the different stage are using the same revision, so can I add a parameter for the revision? the value is dynamicly came from the upstream project.

    or is there any other way to help to do that?

    thanks

    1. May 11, 2010

      Miles D. Duke says:

      Have you had any luck setting this up? We are trying something like this also. ...

      Have you had any luck setting this up?

      We are trying something like this also. Suppose, project B depends upon project A. If a new SCM change affects project A, we want A to build at that version. Because other changes may happen while A is building, we want B to build at the same SCM version.

      We think a parameterized build might help.

      However, we also have the scenario where an SCM change only affects B. In this case, we would like the build on B to start (provided the upstream versions aren't in progress).

  17. Feb 10, 2010

    boy.pockets says:

    I seem to be getting some inconsistent behaviour (or most likely, I don't unders...

    I seem to be getting some inconsistent behaviour (or most likely, I don't understand what is happening).

    I have a string parameter:

    LocalOutputPath
    

    I set the value to:

    ${Workspace}\${JOB_NAME}\workspace\bin
    

    When I try and use this in a Windows Batch Command like so:

    cd %LocalOutputPath%
    

    I get this in the Output:

    C:\WINDOWS\system32\config\systemprofile\.hudson\jobs\HudsonUtils\workspace>cd ${Workspace}\HudsonUtils\workspace\bin 
    The system cannot find the path specified. 
    :(
    

    Note:

    ${JOB_NAME}
    

    is the project specific environment variable

    ${Workspace}
    

    is a Global Property (set in the hudson/configure page)

    I am able to access Workspace directly, by using %Workspace% in a Windows batch command.
    But I would have expected ${JOB_NAME} to fail too if ${Workspace} fails.
    It seems that Hudson is evaluating the value of ${JOB_NAME}, but not ${Workspace}.
    
    1. Feb 10, 2010

      boy.pockets says:

      Just a quick note about WORKSPACE and Workspace. They are different variables - ...

      Just a quick note about WORKSPACE and Workspace. They are different variables - upper case is the project specific variable and Cammel case is the Hudson wide variable (something I added). I tried deleting the one i created, but I still had the same problem with WORKSPACE.

  18. Feb 24, 2010

    Erdal Karaca says:

    It seems that parameters are not visible to parameters, i.e. I cannot embed decl...

    It seems that parameters are not visible to parameters, i.e. I cannot embed declared parameters inside other parameters:

    my.param=value1

    my.other=${my.param}-${JOB_NAME}

    The JOB_NAME will be expanded, my.param not. Is this a 'missing feature' or do I miss something?

    1. Sep 21, 2012

      P Y says:

      Hi, I second this question, for me this is working just partially (see example b...

      Hi,
      I second this question, for me this is working just partially (see example below)
      I am passing various parameters using a common one, and some are replaced, some others not:
      Is there any solution available? thanks in advance!
      Pablo
      ----

      (Note: removed "$" and so to avoid formatting issues)

      PRJ_BASE = AB

      DB = d:\casdev\sbxs\ffm-mks1\reg\ PRJ_BASE} \ PRJ_BASE.xy -> d:\casdev\sbxs\ffm-mks1\reg\AB\AB.xy
      XDOC_PATH = d:\casdev\sbxs\ffm-mks1\reg\PRJ_BASE -> d:\casdev\sbxs\ffm-mks1\reg\AB 

      OUTPUT_CONF= JENKINS_HOME\Tools.doc.conf\ PRJ_BASE.doxygen.conf.txt  -> d:\jenkins\Tools.doc.conf\ PRJ_BASE.doxygen.conf.txt

      OUTPUT_DIR= D:\public_html\doc\PRJ_BASE -> D:\public_html\doc\ PRJ_BASE

      WARN_FILE = D:\public_html\log\PRJ_BASE.doxygen.errorlog.txt  -> D:\public_html\log\AB.doxygen.errorlog.txt 

  19. Apr 09, 2010

    markjwolff - says:

    If I want to send multiple parameters, I would say...? http://server/job/myjob/b...

    If I want to send multiple parameters, I would say...? http://server/job/myjob/buildWithParameters?PARM1=Value1;PARM2=Value2

    I've gone through ;, & and a few others. I've looked at examples, URL/DNS standards docs, etc and still no luck. Any help here?

    Answer is http://server/job/myjob/buildWithParameters?PARM1=Value1;PARM2=Value2http://server/job/myjob/buildWithParameters?PARM1=Value1&PARM2=Value2

    1. May 24, 2011

      wolfgang haefelinger says:

      The usual way http://server/job/myjob/buildWithParameters?PARM1=Value1&PA...

      The usual way

      http://server/job/myjob/buildWithParameters?PARM1=Value1&PARM2=Value2
      

      works fine.

  20. Jun 01, 2010

    pgilmon - says:

    How can you do the same for a Maven Release? When I try to perform a Maven Relea...

    How can you do the same for a Maven Release? When I try to perform a Maven Release on a Parameterized job it does not ask for any parameter...

  21. Jul 22, 2010

    Josh Figler says:

    I'm trying to figure out how to do the Parameterized Build with a File Parameter...

    I'm trying to figure out how to do the Parameterized Build with a File Parameter. I understand everything except how to specify the file to be uploaded. Can someone please provide an example?

  22. Jul 28, 2010

    Kedar Mhaswade says:

    Josh, Does this help? http://infradna.com/content/using-file-parameters-hudson...
    1. Sep 09, 2010

      Josh Figler says:

      Yes – it does! Thanks!

      Yes – it does! Thanks!

  23. Aug 04, 2010

    Jamie Thomson says:

    Hi folks, Day 1 with Hudson ... slowly but surely getting up to speed. My ques...

    Hi folks,

    Day 1 with Hudson ... slowly but surely getting up to speed.

    My question is about run parameters. I've seen that I can use them to reference a particular run of a particular project - that's all fine.

    What I don't understand (and can't find any docs on) is how I refer to anything in the run defined by the run parameter. Essentially I want to reference the %BUILD_NUMBER% & %SVN_REVISION% of the run that is chosen. How can I do that?

    thanks in advance

    Jamie Thomson

  24. Nov 16, 2010

    Henri Gomez says:

    I set a job with parameter. It works well with Hudson used in standalone (ie: To...

    I set a job with parameter.
    It works well with Hudson used in standalone (ie: Tomcat + Hudson webapp).

    I notice a 405 HTTP (error) code is sent back to browser when clicking on a job with build parameters.
    But operations continue....

    Problem appears with a couple like Apache HTTPd and Tomcat 6, and with mod_jk configured to let Apache HTTPd handling errors like 404, 500...

        JkUnmount /errors_pages/* hudson;use_server_errors=400
        JkMount /* qahudson;use_server_errors=400
    

    I had to use the following settings (transforming 404 into 503, a weird hack) and jk won't consider error for HTTP code less than 500.

        JkUnmount /errors_pages/* hudson;use_server_errors=500;fail_on_status=-404,
        JkMount /* hudson;use_server_errors=500;fail_on_status=-404
    

    Could you fix the 405 sent back and use a 200 instead ?

  25. Jan 04, 2011

    Kendrick Martin says:

    What would be the best process for setting up multiple schedules that each pass ...

    What would be the best process for setting up multiple schedules that each pass in different values for the parameters? Say I have a job that I want to run every 30 minute with a limited test sweet and then once a night I want to call it with the full suite.

  26. Jan 19, 2011

    vknajtner - says:

    Inability to pass parameters to downstream build is a major flaw.  I want t...

    Inability to pass parameters to downstream build is a major flaw.  I want to have a separate generic parametrized build and nightly regression test jobs that can be invoked in an arbitrary sequence.

  27. May 17, 2011

    Julien Carsique says:

    It would be useful being able to trigger another job passing parameters: ie. jo...

    It would be useful being able to trigger another job passing parameters:

    ie. job1 is run with build parameter param1, I would like that job to trigger a job2 with the same parameter. Trigger job2?param2=$param1

    1. May 18, 2011

      Gabor Engler says:

      This plugin support this: [Parameterized Trigger Plugin|]

      This plugin support this: [Parameterized Trigger Plugin|]

  28. May 24, 2011

    wolfgang haefelinger says:

    When triggering a build with parameters, I'm getting a HTTP 302 (redirect) statu...

    When triggering a build with parameters, I'm getting a HTTP 302 (redirect) status code:

    $ curl --verbose 'http://MYJENKINS1412/job/MYJOB/buildWithParameters?DRYRUN=true&VERSION=5.0.0'
    * About to connect() to  MYJENKINS1412 port 80 (#0)
    *   Trying 10.14.2.129... connected
    * Connected to MYJENKINS1412 (10.14.2.129) port 80 (#0)
    > GET /MYJOB/buildWithParameters?DRYRUN=true&VERSION=5.0.0 HTTP/1.1
    > User-Agent: curl/7.21.2 (x86_64-apple-darwin10.4.0) libcurl/7.21.2 OpenSSL/1.0.0c zlib/1.2.5 libidn/1.19
    > Host: MYJENKINS1412:80
    > Accept: */*
    >
    < HTTP/1.1 302 Found
    < Server: Winstone Servlet Engine v0.9.10
    < Location: http://MYJENKINS1412/job/MYJOB/

    [..]

    * Connection #0 to host prod.ci.internal.epo.org left intact
    * Closing connection #0

    Why not simply returning a status code of 200 if job was submitted successfully? If redirection is required, then either provide a 'redirect trigger URL' or let user add a 'redirect=true' parameter (where redirect is reserved and can't be used as regular parameter name).

  29. May 24, 2011

    wolfgang haefelinger says:

    Triggering a build with parameters works as HTTP GET, as HTTP HEAD, as HTTP OPTI...

    Triggering a build with parameters works as HTTP GET, as HTTP HEAD, as HTTP OPTIONS  .. and as HTTP POST request. So, regardless which HTTP vocabulary is used, a build is triggered. You may ask yourself whether this makes sense or not.

    While POST is the right way of doing, what's wrong with GET in the first place? Imagine a webpage listing a long list of triggerable jobs, all written down in terms of HTTP GET. Imagine further that one of this powerful web crawlers comes along the way to index this page. That crawler would trigger all jobs by following those (GET) URLs. Something you would like to avoid.

  30. Jun 21, 2011

    Mark Williams says:

    This may have been addressed in previous postings -but- I had setup a jo...

    This may have been addressed in previous postings -but- I had setup a job with parameters when using hudson, now when using Jenkins I cannot add new parameters to this job anymore. Has anyone run into this problem?

  31. Jul 19, 2011

    Martin Woit says:

    Is there an opportunity to assign other parameters to one specified parameter, f...

    Is there an opportunity to assign other parameters to one specified parameter, for example: I have a choice parameter with 3 values (v1, v2 and v3). If "v1" is selected on the page after the build button is clicked, two or more other text parameters are visible. If "v2" is selected, only the choice parameter dropdown list is shown?

    In the picture "v1" is "DEV" and "v2" is "LIVE".

  32. Aug 30, 2011

    Thomas Randall says:

    I love this plugin!   My only issue right now is that I want to bu...

    I love this plugin!   My only issue right now is that I want to build a Jenkins job whose CVS repository is dynamic.  I'm selecting a 'Choose' parameter, where the user picks his/her CVS repository from the dropdown, to set the 'CVS_PROJECT' parameter.  Unfortunately, I am getting the following error when I try to define the CVS module as 'CVS_PROJECT'.

    Started by user trandal
    [BUILD_RULE_TEST_YOUR_PROJECT] $ "C:\Program Files\CVSNT\cvs.exe" -Q -z3 -d :pserver:buildeng@aixdev1:/cvs/cgi co -P -d workspace -D "Monday, August 29, 2011 10:24:27 PM UTC" CVS_PROJECT
    cvs server: cannot find module `CVS_PROJECT' - ignored
    FATAL: CVS failed. exit code=1
    Finished: FAILURE
    

    Is there some way to define this so I can define the module using the parameter? Thank you!

    Note:  Looks like they're already managing multiple JIRA issues on this [JENKINS-3230] - in the meantime, I used the EXCELLENT instructions provided here.

  33. Sep 13, 2011

    Christian Strzadala says:

    I'm using pipeline plugin in Jenkins. I have the following job setup: - Job...

    I'm using pipeline plugin in Jenkins. I have the following job setup:

    - Job A -> parametized build trigger Job B

    - Job B -> parametized build trigger Job C

    When I use the pipeline plugin starting with job A, I can see job B as a downstream job but not job C (or other jobs that C may kick off)

    I assume this may be part of this Jira issue https://issues.jenkins-ci.org/browse/JENKINS-5184

    Can I get an indication if this is a bug in the plugin or if it could be a bug in the Pipeline plugin.

  34. Sep 13, 2011

    Moustafa Badawy says:

    I have a question regarding Run Parameters. I have a Jenkins job (job A) that ha...

    I have a question regarding Run Parameters. I have a Jenkins job (job A) that has a run parameter named 'build' referencing to the builds of another Jenkins job (job B). In the build script of job A, when executing '$ env' to display the environment variables, I see there are three variables generated by this Run Parameter. They are, 1- build  2-build.jobName 3-build.number. And as far as I know, a bash variable name is not allowed to contain the dot '.' character. So my question is how to read the two variables (build.jobName & build.number) generated by the plugin?

  35. Jan 27, 2012

    Mario Duarte says:

    How come the default value of a Text Parameter can't be a multi-line value? When...

    How come the default value of a Text Parameter can't be a multi-line value? When I start a build I can then break it into multiple lines but can't have the default value already broken into several lines.

    I was expecting this to be the difference between the String value and the text value.

    1. Jun 15, 2012

      Bruce Edge says:

      I was expecting this as well. What is the diff b/n a sting and a test field? I...

      I was expecting this as well.

      What is the diff b/n a sting and a test field?

      Is there any way of passing in a multi-line value, like for a build matrix target list?

  36. Mar 06, 2012

    jatin patel says:

    I am not able to print parameterized value while printing. I am following the d...

    I am not able to print parameterized value while printing.

    I am following the described steps.
    --------------------------------------------------------------------------
    step 1:
    Build a free-style software project

    step 2:
    IN configuration page, I have selected the option 
    "This build is parametreized"

    Step 3:
    Provide String parameter
    Name  : VERSION
    default value  : RELEASE
    dESCRIPTION  : abcd

    Step 4:

    Under the build section
    SSH Site : My personal linux server
    Command: : echo JAVA_HOME  WORKS FINE echo $VERSION echo "$version" RETURNS Blank line.
    Step 5Save the oncfirations

    Step 6
    Go to home page of job now.

    Step 7
    For triggering build,
    Click on "Build Now"
    (Located on Top Left)

    Step 8.
    We gets a screen to provide the parametreized values
    I provide some default value.

    Step 9
    Click on "Build"
    This step helps me trigger Build.
    -------------------------------------------------------------------------

    Command: : echo JAVA_HOME  WORKS FINE echo $VERSION echo "$version" RETURNS Blank line.
    Am i doing something wrong?. Please Help ?

    1. May 24, 2012

      Kumar Dev says:

      Hi Jatin, I am facing exactly the same problem. Did you manage to find a soluti...

      Hi Jatin,

      I am facing exactly the same problem. Did you manage to find a solution?

      Thanks.

  37. Mar 14, 2012

    Tom Alex says:

    I'm noticing a strange behavior with $WORKSPACE variable on Linux.  If the ...

    I'm noticing a strange behavior with $WORKSPACE variable on Linux.  If the job runs on master, it's an absolute path.  But if the job runs on a slave, it shows a relative path.  Has anyone come across this issue?

    To reproduce the issue:

    1. Setup a job with build command "export" and tie it to master and run it.

    2. Examine the build console log and look for WORKSPACE=  You'll see that this is an absolute path.

    3. Modify the job to run on a slave node and run it.

    4. Examine the build console log and look for WORKSPACE=  You'll see that this is a relative path. 

  38. May 07, 2012

    Sarathy Gunasekaran says:

    How can I read multiline'd value from Text Parameter

    How can I read multiline'd value from Text Parameter

  39. May 15, 2012

    Denis Blanchette says:

    I am sending parametrized links to a job to authorized people so they can start ...

    I am sending parametrized links to a job to authorized people so they can start they job they wish.

    I have a problem when they are not logged in :

    - The person clicks the link

    - They get the log in page instead of the build page.

    - They log in.

    - The build starts without parameters.

    - The build fails.

    Any help would be appreciated

  40. May 22, 2012

    Zeev Tavor says:

    Hello all, I can't pass parameters to build by URL. I try this one: JENKINS_UR...

    Hello all,

    I can't pass parameters to build by URL. I try this one:

    JENKINS_URL/job/CCBL_Test/buildWithParameters?PROJECTS=Test

    PROJECTS is the name of Extended Choice Parameter plugin i added in the job configuration.

    If I use basic parameters like string, it works fine but with plugins extensions it doesn't.

    What I'm doing wrong? 

    Please advice, 
    Thanks

  41. May 24, 2012

    Kumar Dev says:

    Hi, I am trying to do a parameterized build and here's what I am doing: 1. Bui...

    Hi,

    I am trying to do a parameterized build and here's what I am doing:

    1. Build a free-style software project

    2. This build is parameterized

    3.Provide String parameter
    Name  : ORACLE_SID
    default value  : HOST1DB01
    dESCRIPTION  : HOST1DB01

    4. Build

    Execute shell script on remote host using ssh
    SSH Site : HOST1
    Command: : echo Oracle SID is $ORACLE_SID

    5. Save

    When I run the build, it doesn't print the value of ORACLE_SID. Instead it prints blank.

    Can someone help please?

    Thanks.

    1. May 24, 2012

      Martin Woit says:

      Hi Kumar, is it possible that the parameter you want to use only exists on the ...

      Hi Kumar,

      is it possible that the parameter you want to use only exists on the machine where the build runs? I think the parameters where saved as environment variables and they couldn't be used as a parameter in a shell script on remote host using ssh.

      I hope that answers your question.

      1. May 25, 2012

        Kumar Dev says:

        Hi Martin, These parameters are to used on the remote machine. I can define the...

        Hi Martin,

        These parameters are to used on the remote machine. I can define them on the remote machine, but in that case I will have to create a job for each machine. If there was a way to pass the parameters via jenkins, 1 job would have done.

        Thanks.

  42. Jun 28, 2012

    David Gibson says:

    Is it possible to select the machine that a job runs on via parameters? We have...

    Is it possible to select the machine that a job runs on via parameters?

    We have a job that installs a new version of the product. I would like it to prompt the user for a directory, and the slave to install on.

    It's easier than having to reconfigure the job every time to run on a specific slave.

  43. Jul 05, 2012

    Joaquin Corchero says:

    Hi, I'm quite new in Jenkins so I'm sorry if the question seems a bit stupid......

    Hi,

    I'm quite new in Jenkins so I'm sorry if the question seems a bit stupid...

    I'm having a bit of an issue when trying to set a parameter value within a project that will later be used by other projects within the deployment pipeline...

    I installed the parameterized build plugin and created a string parameter which value I'm trying to set within a batch command in the bulid triggers section of the project, the issue is that that value doesn't seem to be working very well as once the job has run, if I go to the deployment pipeline, the parameter doesn't have any value...

    Thank you for your help

  44. Jul 17, 2012

    Ganesh Kumar says:

    Hi, I am triggering my build using jenkins as follows from jenkinsapi.jenkins ...

    Hi,

    I am triggering my build using jenkins as follows

    from jenkinsapi.jenkins import *
    from jenkinsapi.job import *

    jenkin = Jenkins('http://hudsonserver','username','password')
    myJob = Job("http://hudsonserver/job/sample_trigger_build/","sample_trigger_build", jenkin)
    parameter="sample_file.txt":"/home/user/sample_file.txt"
    myJob.invoke('build',False,False,3,15,parameter)

    I am getting urllib2.HTTPError: HTTP Error 500: Internal Server Error. Please help me in this. Thanks in advance.

    Note:parameter will come inside parenthesis, while posting, if i use parenthesis it is giving unknown macro error.

  45. Jul 26, 2012

    Kishore Sasidharan says:

    Hi All Is there a way to change/set the value of a pre-defined string parameter...

    Hi All

    Is there a way to change/set the value of a pre-defined string parameter in the build script ?

    Basically I want to change the recipient of the email plugin based on the output from the build. The easiest was I could find was to set a build parameter which can be used by the editable email plugin. 

    The Editable email plugin gets the build parameter. I am not able to change/set the value of the parameter to the value I want inside the build script. 

    Thanks in advance

    -mastkis

  46. Aug 14, 2012

    wang y says:

    Hi, When use file parameter to set,Contains Chinese parameters will become garb...

    Hi,

    When use file parameter to set,Contains Chinese parameters will become garbled.

    How can I configure?

  47. Jan 06, 2013

    Larry Cai says:

    Where is this plugin now ? renamed or merged ? I can't find it plugin repo.

    Where is this plugin now ? renamed or merged ? I can't find it plugin repo.

  48. Mar 28, 2013

    Alexander Artemov says:

    It would be good if you give an example of curl command to trigger a remote buil...

    It would be good if you give an example of curl command to trigger a remote build.

    Since it was changed to POST, you need to add to your command "-X POST"

  49. May 15, 2013

    Andre Stone says:

    Hello, i try to upload a file trough the option "file-parameter" into the works...

    Hello,

    i try to upload a file trough the option "file-parameter" into the workspace. This failed!

    I get this result:
    The permission of the worspace folder of this job is set on "full control" for the user of the Jenkins service

    Did anyone faced this issue?

    Thanks in advance
    Andre

  50. May 24, 2013

    Tobias von der Krone says:

    Hi, is it possible to use parameters given in the build url which are not confi...

    Hi,

    is it possible to use parameters given in the build url which are not configured in the job? An example:

    Thanks in advance,
    Tobias