meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
git:gitlab:maintenance [2020/07/09 09:01] – created niziakgit:gitlab:maintenance [2020/07/09 14:08] (current) niziak
Line 21: Line 21:
  
 </code> </code>
 +
 +==== Not expired artifacts ====
 +
 +  * Using python tool: [[https://gitlab.com/haboustak/glartifacts|Glartifacts]]
 +  * Doc: [[https://glartifacts.readthedocs.io/en/latest/]]
 +
 +On Gitlab server:
 +<code bash>
 +sudo apt-get remove python-pip
 +sudo apt-get install python3-pip
 +pip3 install --upgrade pip
 +
 +sudo apt-get install postgresql postgresql-server-dev-all
 +sudo systemctl disable --now postgresql.service
 +
 +sudo pip install \
 +      'grpcio>=1.15.0' \
 +      'protobuf>=3.6.1' \
 +      'psycopg2>=2.6' \
 +      'pyyaml>=3.11'
 +
 +sudo pip install glartifacts
 +</code>
 +
 +Usage:
 +<code bash>
 +glartifacts list
 +
 +glartifacts remove --strategy LASTGOOD_PIPELINE --dry-run group/subgroup/project
 +
 +glartifacts remove --strategy LASTGOOD_PIPELINE --all
 +
 +# by default Sidekiq task 'cronjob:expire_build_artifacts' is running every 50 minutes, force it now
 +# Go to https://gitlab.example.com/admin/background_jobs --> "Cron" tab and "enqueue Now"
 +# and check results:
 +glartifacts list
 +</code>
 +
 +==== Job logs ====
 +
 +Hundreds of jobs with build log size of 16MB can occupy gigabytes on disk.
 +[[https://docs.gitlab.com/ee/administration/job_artifacts.html#job-artifacts-using-too-much-disk-space|Job artifacts using too much disk space]]
 +
 +