jenkins: pass multiple "Extended Choice Parameter" values using a URL

jenkins

Solution

Including the URL in single quotes work:

wget '${JENKINS_URL}/job/buildname/buildWithParameters?ECP_LIST=blah3&token=token'

Similarly if you want to run a curl through your Jenkins API with curl you would run:

curl -X POST 'http://api:xxxxxxxxxxxxxxxxxxxxxxx@jenkins.YOURSERVER.com/job/BUILDNAME/buildWithParameters?parameter2=blah&parameter2=blahblah'

Problem

One of the parameters in my `Jenkins` build is an Extended Choice Parameter which is submitted as a selection of comma separated values when invoking the build from the build webpage. However, I also need to invoke the build using `wget` + `URL`. So, in the format: ``` wget "${JENKINS_URL}/job/buildname/buildWithParameters?ECP_LIST=blah1&token=token" ``` Say my Extended Choice Parameter ECP_LIST has possible values: blah1, blah2, blah3, blah4. if I invoke, for example: ``` wget "${JENKINS_URL}/job/buildname/buildWithParameters?ECP_LIST=blah3&token=token" ``` the build starts fine with value blah3 for the EPC_LIST parameter. However, if I wish to invoke it with 2 or more values, it just passes a blank value to the parameter. I've tried separating the values using various things, like spaces, encoded comma, semi-colon. I haven't had any luck finding an answer here or on Google either.

Original source