As you know, Hudson supports a RESTful-API. So here a small cookbook using
curl (running in
cygwin). It is very easy, when you are accustomed to it.
#Get the current configuration and save it locally curl -X GET http://user:firstname.lastname@example.org/job/myjobname/config.xml -o mylocalconfig.xml #Update the configuration via posting a local configuration file curl -X POST http://user:email@example.com/job/myjobname/config.xml --data-binary "@mymodifiedlocalconfig.xml" #Creating a new job via posting a local configuration file curl -X POST "http://user:firstname.lastname@example.org/createItem?name=newjobname" --data-binary "@newconfig.xml" -H "Content-Type: text/xml"
--data-binary to post the data, else the line-endings won’t be transfered correctly.