xmos / lib_xud

XMOS USB code and associated examples
Other
8 stars 25 forks source link

Add buildDiscarder and timestamp option to Jenkins #315

Closed BrennanGit closed 2 years ago

BrennanGit commented 2 years ago

This PR introduces a method for automatically deleting Jenkins builds after a certain time/number. This is needed so that Jenkins disk does not forever grow.

Please understand that THIS IS A DESTRUCTIVE CHANGE and once merged to develop will permanently delete old builds so please come forward with any concerns over the settings chosen if you have any.

We will use the buildDiscarder Jenkinsfile option to configure this on a repo-by-repo basis.

This process has been tested using this repo and this jenkins job.


Here is a link to the confluence page going into more detail about justification and usage.

The short version is we propose to delete any build older than 100 on the develop branch of this repo.

Please comment if you think this is unsuitable.


PS I have also opted to use this opportunity to add the timestamps option to jobs that do not already employ it. This makes it easier to diagnose any future Jenkins issues.

BrennanGit commented 2 years ago

Note: this will keep builds after around 1431 from 13/10/21

BrennanGit commented 2 years ago

of course, I will wait until all 10 of the made PRs have an outcome before merging as it will provide a sensible point to run a backup/snapshot.

xross commented 2 years ago

Fine by me.