Hi

Is it possible/straightforward to execute a promotion remotely with a
client such as 'curl'?
My promotions are manually triggered and they require for a particular user
to approve it.

I noticed that the URLs used has this format:
http://
<jenkins_host>/job/<job_name>/<build_number>/promotion/promotionProcess/<promotion_name>/promotionCondition/hudson.plugins.promoted_builds.conditions.ManualCondition/approve

I also noticed that the form data sent is:
json:{"": "johndoe"}
where "johndoe" is the username that approves it.

So, I have tried this:
curl --user johndoe:johndoepass -X POST -d 'json:{"": "johndoe"}' "
http://jenkins_host/job/dummy/30/promotion/promotionProcess/mypromotion/promotionCondition/hudson.plugins.promoted_builds.conditions.ManualCondition/approve
"

but I get an "Error 400: Exception: This page expects a form submission"
Has anyone done this before?

Thanks.
Regards.

Reply via email to