0

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

3
  • Do I understand this correctly that you want to set the default value of a parameter in a parameterized project via an URL parameter? Commented Jul 17 at 20:29
  • @GeroldBroser Yes. I expect some solution that can parsing parameters string (HelloWorld in my case) from url and send string into my param when I build my parameterized project automatically. Commented Jul 17 at 23:30
  • The last part contradicts the title. There is "build with ... UI interface" vs. "build ... automatically" now. Commented Jul 18 at 6:57

1 Answer 1

1

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

Allows the user to provide parameters for a build in the url, prompting for confirmation before triggering the job.

With that the URL:

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

results in: enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the help. This is what I need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.