Hudson: where to download file and stop specific builds running ?
- by Kim Jong Woo
I have a file that is generated inside (hudson server) /var/lib/hudson/jobs/jobtitle/1/out.txt
I need to fetch this file, but doing a GET request for http://myhudson:8090/job/jobtitle/1/out.txt doesn't actually locate the file.
Basically, I have another box that will grab this file from the hudson server. This box will make the out.txt file available for download.
Another challenge is the build number directories. How would I be able to use the hudson API to stop or delete the specific builds running ?
I am forced to do iterate through all build numbers to send STOP or DELETE api call in php using wget to do the REST API call. This is not very efficient.
for ($i=0; $i < 3000; $i++){
exec('wget -O /dev/null "http://myhudson:8090/job/' . 'jobtitle' . '/$i/stop"');
}