Work with GitLab
Releasev0.35.0 · cfeceb67
mw gitlab (alias mw gl) includes the glab CLI and defaults to Wikimedia’s GitLab instance. Authenticate before running commands that need your account:
mw gitlab auth loginRun repository commands from a checkout with a GitLab remote.
Merge requests
Section titled “Merge requests”mw gitlab mr listmw gitlab mr create --fillReleases and pipelines
Section titled “Releases and pipelines”mw gitlab release listmw gitlab ci lintmw gitlab ci statusList individual artifacts created by recent jobs in the current project, or
select another project with -R:
mw gitlab ci artifacts list --since 48h --min-size 300MiBmw gitlab ci artifacts list --since 7d --min-size 1GiB -R releng/climw gitlab ci artifacts list --since 24h --min-size 300MiB --ref-prefix refs/merge-requests/mw gitlab ci artifacts prune --since 24h --min-size 300MiB --ref-prefix refs/merge-requests/Listing scans recent jobs and shows individual artifact files and their sizes.
The prune command without --yes shows the matching files and stops without
deleting them. Add --yes to delete those individual files; job logs are not
included. GitLab marks bulk artifact deletion as experimental.
The artifact recording demonstrates listing merge request artifacts from the last 24 hours and previewing the same set for pruning.
Artifact storage overview
Section titled “Artifact storage overview”Use a compact summary to find the largest artifact consumers before choosing prune filters:
mw gitlab ci artifacts summarymw gitlab ci artifacts summary -R releng/climw gitlab ci artifacts summary --since 7d --ref-prefix refs/merge-requests/mw gitlab ci artifacts summary --output jsonThe summary is read-only and defaults to the entire project job history
(--since all), following all pages including retried jobs. Large projects can
take time to scan; --since, --ref-prefix, and --min-size narrow the overview.
Totals reflect only matching artifacts visible to your account at scan time,
not a transactional snapshot or the project’s total disk usage.
Text output shows total bytes, artifact count, and distinct job count, followed
by separate job-name and artifact-type tables sorted by decreasing storage size.
Repeated runs of the same job name are combined. Job counts in the type table
can overlap because a job can have multiple types. JSON returns total,
by_job, and by_type, with jobs, artifacts, and exact size_bytes fields
for each entry; grouped entries also have a name.
GitLab’s Jobs API reports sizes for stored artifact files such as archive,
metadata, and junit. The summary counts each entry in the artifacts array
once, not the duplicate archive total in artifacts_file. Archive metadata is a
separate stored file, not a second measurement of the archive. Job logs (trace)
are excluded, just as in list/prune. Types describe GitLab storage categories,
not file extensions or uncompressed archive contents; the API does not expose
per-file sizes inside an archive here. A missing type is shown as unknown.
Find repositories
Section titled “Find repositories”mw gitlab repo search --search="docker"Use mw gitlab --help or a subcommand’s --help for all options. The command reference documents the version included in this release.
Read this guide offline with mw help guides gitlab.
Adapted from MediaWiki.org under CC BY-SA 4.0; see the linked page history for contributors.
Page views: —Sessions: —