Trim and Prune Artifacts
We are currently lugging around 22 TB of artifacts over in:
root@worker-web01:/var/opt/gitlab/gitlab-rails/shared/artifacts# du -khs .
22T .
root@worker-web01:/var/opt/gitlab/gitlab-rails/shared/artifacts#
These are all broken down by year and month:
root@worker-web01:/var/opt/gitlab/gitlab-rails/shared/artifacts# ls -alh
total 2.2M
drwx------ 20 git root 4.0K Mar 1 00:06 .
drwxr-x--x 8 git gitlab-www 117 Dec 9 16:59 ..
drwxr-xr-x 13 git git 4.0K Nov 29 2015 2015_11
drwxr-xr-x 93 git git 4.0K Jan 1 2016 2015_12
drwxr-xr-x 207 git git 8.0K Jan 31 2016 2016_01
drwxr-xr-x 451 git git 12K Feb 29 2016 2016_02
drwxr-xr-x 683 git git 20K Mar 31 2016 2016_03
drwxr-xr-x 1850 git git 44K Apr 30 2016 2016_04
drwxr-xr-x 1970 git git 48K Jun 7 2016 2016_05
drwxr-xr-x 2342 git git 56K Jun 30 2016 2016_06
drwxr-xr-x 2929 git git 72K Jul 31 2016 2016_07
drwxr-xr-x 3950 git git 96K Sep 14 13:07 2016_08
drwxr-xr-x 4850 git git 116K Oct 1 10:35 2016_09
drwxr-xr-x 5540 git git 132K Nov 1 01:02 2016_10
drwxr-xr-x 6969 git git 164K Dec 4 20:58 2016_11
drwxr-xr-x 6374 git git 152K Dec 31 23:58 2016_12
drwxr-xr-x 7832 git git 188K Feb 1 19:48 2017_01
drwxr-xr-x 8374 git git 200K Mar 2 19:20 2017_02
drwxr-xr-x 3084 git git 76K Mar 5 03:14 2017_03
drwx------ 4 git git 44 Nov 25 2015 tmp
FOUR DAYS into March and we're already at 1.1 TB, the numbers for 2017 so far are as follows:
- March 2017 (4 days) : 1.1 TB
- February 2017 (28 days) : 4.2 TB
- January 2017 (31 days) : 3.7 TB
We need an automated way to depreciate and trim artifacts because they are just going to keep growing out of hand.