Troubleshooting
Artifacts1
Delete artifacts older than a specific date
From gitlab-rails console:
builds_to_clear = builds_with_artifacts.where("finished_at < ?", 1.week.ago)
builds_to_clear.find_each do |build|
  build.artifacts_expire_at = Time.now
  build.erase_erasable_artifacts!
endThe same can be done to include logs as well:
builds_to_clear = builds_with_artifacts.where("finished_at < ?", 1.week.ago)
builds_to_clear.find_each do |build|
  print "Ci::Build ID #{build.id}... "
 
  if build.erasable?
    build.erase(erased_by: admin_user)
    puts "Erased"
  else
    puts "Skipped (Nothing to erase or not erasable)"
  end
endExpiration cron job
In /etc/gitlab/gitlab.rb enable
gitlab_rails['expire_build_artifacts_worker_cron'] = "*/7 * * * *".