Jenkins is running on a AWS EC2 Server. I caught an alarm shows that the CPU utilization rate was over 98% for 2 mins long and I restarted my Jenkins. The CPU utilization rate did go down but partially my jobs’ configuration was gone. Can’t find config.yml in the jenkins/jobs folder. But some of jobs which I edited recently stayed as the same. So I’m wondering if Jenkins have a trigger to clean old jobs’ configuration when being restarted? Appreciate any help below!
Almost all jobs can have a history setting configured to remove old builds:
“Multibranch pipeline” jobs (which to some extent can be modeled as a bunch of separate pipeline jobs under one folder) take a different stance on this setting. There, a whole “sub-job” matching a branch/PR can get deleted once the Git branch is removed from the repo / the PR is closed.
“Organization folder” jobs should probably have something similar, but I never used them.
Other than that, I am not aware of any cleanups that Jenkins could perform automatically at a job level… If anything, I would’ve expected your latest changes being lost instead, if for some reason Jenkins could not save them to disk yet.
Jenkins is not deleting any jobs by itself, only builds when configured to do so as already mentioned by @Artalus
Thanks so much! I think maybe it’s the former colleagues configured Jenkins to delete the old jobs configuration. I’ve recovered the configuration through the EBS backup snapshot.