views:

194

answers:

3

Hi,

I've used the Simple Promote Plugin in Hudson and it set my build to "keep this build forever".

Is there any way i can delete it?

I got access to the slave who build it and to the master (tried to find anything related in there but no luck).

Thanks,

Tiago

+3  A: 

I'm not sure whether (or how) the Simple Promote Plugin affects this at all, but can't you just click the button that says "Don't keep this build forever", followed by "Delete"?

When a build is marked as "keep forever" (and the padlock icon shows next to the build), you should be able to "unlock" it by pressing that "Don't keep..." button on the build page.

Christopher
Hi Christopher,Thanks for your fast answer. I wasn't sure to so i promoted a few more builds to check for the pattern ant it happens as said.Whenever I "promote" a build I loose the ability to delete it. And, as you said, I get the padlock icon. The problem is that the icon is just an icon. It's not clickable.It has the usual tooltip "Keep This Build Forever" but i can't interact with it.
Tiago
Ok. Normally if you click the build number/timestamp link (rather than the icon) to view its page, there should be a "Don't keep this build forever" button in the top right, where the "Delete" button normally is.
Christopher
Yah, I know. But it's not there :/ honestly don't get it. Do u know of some way to delete it via back-end? Like going to the server and deleting some folders or manipulating some files? Once again, thanks for your interest.
Tiago
Ok, fair enough :) You can remove a build by deleting the named directory on the master under `$HUDSON_HOME/jobs/job-name/builds/42` (though that's from memory, so might not be exact). If you just want to remove the artifacts, remove the `archive` subdirectory.
Christopher
Sorry for taking so long to answer your comment Christopher but I was expecting some kind of mail notification on new comments. I've tried that before but the build doesn't go away from the build list and when I click there the folder is created again on disk. But thanks anyway as I feel one step closer.
Tiago
A: 

Just as Christopher said, you can remove the build just by deleting the build directory on the master, inside the job directory.

However if you access the page again, the build data gets dumped to disk again. So you either shut down Hudson first, or you go to the Hudson management console and 'Reload Configuration from Disk' which basically discards whatever's in memory and reloads from your config files.

Just make sure you do it right after deleting the folder.

Francisco Passos
Thanks for that small detail Francisco. It was essencial. I wish I could make both answers (yours and Christopher) correct.
Tiago
The idea on StackOverflow is to have *one* correct answer with all the info, so one of the answers here should really be edited to include all the information together. Anyway, glad it's sorted.
Christopher
A: 

hi, Tiago

I think that the final (and may be the only one step) to completely delete build from Hudson's history is to modify "nextBuildNumber" file placed in job directory.

Fyodor.

related questions