Skip to main content

A custom GitLab workflow helper package.

Project description

gitlab-flow

Custom GitLab workflow helper package built with uv.

Local development

uv sync
uv run gitlab-flow --help
uv run pytest
uv build

Build artifacts are created under dist/.

Onboard a GitLab identity

gitlab-flow onboard creates a GitLab user, registers an Ed25519 SSH key, issues an impersonation PAT, and prints the credentials as JSON.

GITLAB_URL=https://gitlab.example.com \
GITLAB_TOKEN=glpat-admin-token \
GITLAB_SSH_HOST=git.example.com \
GITLAB_EMAIL_DOMAIN=example.com \
uv run gitlab-flow onboard doc-fixer

Optional environment variables:

GITLAB_SSH_PORT=22
GITLAB_PAT_EXPIRES_AT=2099-12-31

If GITLAB_PAT_EXPIRES_AT is not set, gitlab-flow asks GitLab to create a non-expiring token. If the instance requires token expiration dates, the command fails with an explicit error instead of silently choosing a fallback date.

The JSON includes pat.token, ssh.private_key, and ssh.public_key. Progress and errors are written to stderr.

Publish to GitLab Package Registry

The included .gitlab-ci.yml publishes the package when a Git tag is pushed.

git tag v0.1.0
git push origin v0.1.0

GitLab CI publishes to:

${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi

using:

uv publish \
  --publish-url "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi" \
  --username gitlab-ci-token \
  --password "${CI_JOB_TOKEN}" \
  dist/*

Install from GitLab

Replace <project-id> and <token> with your GitLab project ID and a token that can read the package registry.

uv add gitlab-flow \
  --index-url "https://__token__:<token>@<gitlab-host>/api/v4/projects/<project-id>/packages/pypi/simple"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gitlab_flow-0.1.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file gitlab_flow-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: gitlab_flow-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for gitlab_flow-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0fb66fdd74ef93d1714a66a1b4aa286167ee007b2e40b8906999340a4e9ae0ba
MD5 a87eaae94588e9cac3b11c9d36cd14e3
BLAKE2b-256 78964dbad0d3cdbd7709fa26141ef8850ec652e9fd4229d015013c892a58a930

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page