When a jenkins instance is running with an active sync plugin there seems to be an issue when a job gets renamed.
Steps to reproduce
- Setup jenkins instance with active sync to a git repository
- ensure some builds have completed so that a workspace is available
- rename job which has a work space
- Old job is moved to new job in VCS
- Job is moved and workspace information is pushed to the repo
- This also include lastSuccessful references etc.
- Configuration repo grows to a massive size as binaries start to get synced up to git (~5GB) in our case.
Resolution in the event of issue
- create new repo
- clone old repo
- back up config files
- reset hard until the point before the rename
- dump your backed up config over the top of the config (brings you to your latest greatest)
- clean up any jobs that should be deleted
- set the new repo as your upstream, commit and push
- reload the config from the new repo
This has the drawback of losing history between when things went wrong and when you fixed