KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am triggering a parametrized Jenkins job remotely using the Remote Access API like this: url=http://<ci-host>/job/<jobname>/build json="{\"parameter\": [{\"name\": \"A_NAME\", \"value\": \"a_value\"}]}" curl -X POST $url -d token=zorn --data-urlencode json="$json" I want Jenkins to use the configured default value for one of my parameters, but it seems to be expecting values for all of the parameters. If I leave out a parameter, the job sees it as an empty string. Is there a way to make it use the configured default value for a parameter? EDIT: The solution (as per Daniel S.) was to use buildWithParameters as follows: url=http://<ci-host>/job/<jobname>/buildWithParameters curl -s -X POST $url ANOTHER EDIT: But now the problem is that buildWithParameters does not work on a job with no parameters. So it cannot be used for a generic script to start all my jobs.
Tags (comma-separated)
Save Edits
Cancel