jenkinsbuildparameters

How to parse url parameters and use it when build with jenkins UI interface


Is it possible to parse url parameters and then use it for build? Take the snapshot as example, I would like to parse HelloWorld into my parameters user_name when I hit the url \ https://\<jenkins-host>/job/<job-name>/build?<param-key>=<param-value>

enter image description here


Solution

  • For supplying default values for parameters in a parameterized project via the URL you can use the Build With Parameters plugin:

    with that the URL:

    http://localhost:8080/job/Parameterized_with_defaults_from_URL/parambuild/?Parameter=fromURL
    

    results in: enter image description here