Skip to main content

Glartifacts

Python utility to analyze and clean up GitLab artifacts.

Glartifacts is a tool designed to help GitLab administrators manage CI job artifacts. The artifact expiration functionality provided by GitLab (11.6, as of this writing) is primitive. The goal of this project is to design and implement improved artifact expiration policies which act as a model for future GitLab improvements.

See the documentation for more detail on how glartifacts works and how to use it.

Requirements

Glartifacts requires Python 3.

It is also a tool for GitLab administrators, designed to run as root on the GitLab server. It connects directly to the GitLab database and Gitaly gRPC service.

Warning: Backup your database and artifacts

Be sure you have a GitLab backup before you start.

Glartifacts modifies the ci_builds.artifacts_expire_at column in the GitLab database. The next execution of the Sidekiq background task will remove CI artifacts from the database and file system. Once removed, artifacts are non-recoverable.

Installation

Glartifacts from PyPI using pip.

$ sudo pip install glartifacts

Configuration

Glartifacts requires access to the GitLab database and Gitaly server. The default connection settings are based on a standard Omnibus install, but can be modified for custom deployments via settings in glartifacts.conf. You can also override individual settings per-invocation using environment variables.

The table below lists the available configuration options:

Section Option ENV var Default
postgres dbname GLARTIFACTS_DBNAME gitlabhq_production
postgres user GLARTIFACTS_DBUSER gitlab
postgres host GLARTIFACTS_DBHOST /var/opt/gitlab/postgresql
postgres port GLARTIFACTS_DBPORT 5432
gitaly address GLARTIFACTS_GITALYADDR unix:/var/opt/gitlab/gitaly/gitaly.socket

The following paths are searched for the glartifacts.conf. Settings are merged for each conf file found: Defaults > System Settings > User Settings.

$HOME/.config/glartifacts/glartifacts.conf
/etc/glartifacts/glartifacts.conf

Metadata

Release files for glartifacts 2.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for glartifacts 2.4.0
File Size Uploaded
glartifacts-2.4.0.tar.gz 120.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for glartifacts 2.4.0
File Interpreter ABI Platform
glartifacts-2.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 264.7 kB

Release files / glartifacts-2.4.0.tar.gz

Download URL glartifacts-2.4.0.tar.gz
Size 120.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0664bdb3abeb1bfa7f496789ada49aab209bc0cb3828e21bea9f3d0129199384
BLAKE2b-256 checksum
How to use checksums
f6b5be8c286e18a2b4e8ead4f21f2529343b822d91d1b9db9551dcf33afd2a17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / glartifacts-2.4.0-py3-none-any.whl

Download URL glartifacts-2.4.0-py3-none-any.whl
Size 144.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c02ed189325d40efbf0feed37c32f99bacdfa3c49e61fbf80b3292bd67345e54
BLAKE2b-256 checksum
How to use checksums
a6508934d5a7834dc31dfdb18140fa8304bf313be4ec2b45c85f6b87b9c6034f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release history Release notifications | RSS feed

This release

2.4.0 This release

2 release files

2.3.2

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.2

2 release files

2.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page