Skip to main content

monitor Gitlab job statuses on the CLI

Project description

monitor-gitlab-jobs

Script to observe the status of all jobs in your latest Gitlab pipeline

Installation

pip install monitor-gitlab-jobs

Usage

usage: monitor-gitlab-jobs [-h] [--token TOKEN] [--ref REF] [--gitlab_url GITLAB_URL] project_id

monitor Gitlab job statuses on the CLI

positional arguments:
  project_id

options:
  -h, --help            show this help message and exit
  --token TOKEN
  --ref REF
  --gitlab_url GITLAB_URL

Features

  • print a pretty table of all jobs of the latest pipeline (optionally given a ref) and their statuses
  • groups jobs by stage
  • update the table until all jobs are finished
  • returns 0 if all jobs are either successful or skipped, 1 otherwise

Example outputs

$ monitor-gitlab-jobs 1234 --token $GITLAB_ACCESS_TOKEN --gitlab_url $GITLAB_URL --ref 0.6.4
┏━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Stage  Job                       Status     ┃
┡━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ test   run_tests                  success │
├───────┼──────────────────────────┼────────────┤
│ build  build_docker               success │
└───────┴──────────────────────────┴────────────┘
No jobs failed
$ monitor-gitlab-jobs 5678 --token $GITLAB_ACCESS_TOKEN --gitlab_url $GITLAB_URL
┏━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Stage  Job                        Status     ┃
┡━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ test   unit_test                  🏃 running │
│        integration_test           🕓 pending │
├───────┼───────────────────────────┼────────────┤
│ lint   lint                        success │
├───────┼───────────────────────────┼────────────┤
│ build  build                       success │
└───────┴───────────────────────────┴────────────┘
⠹ waiting for jobs to finish...

Project details


Download files

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

Source Distribution

monitor_gitlab_jobs-0.2.0.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

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

monitor_gitlab_jobs-0.2.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file monitor_gitlab_jobs-0.2.0.tar.gz.

File metadata

  • Download URL: monitor_gitlab_jobs-0.2.0.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for monitor_gitlab_jobs-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0237e1fbdb4f015ed8e035f9027c9504816018de3e1c842d494413ea5b3353d9
MD5 d14a1c1766b12933b26ed8c272ab1332
BLAKE2b-256 2d876d533179f763698cec7a46d98135feecd9bea2d8cfeca6fd12adfd887f82

See more details on using hashes here.

Provenance

The following attestation bundles were made for monitor_gitlab_jobs-0.2.0.tar.gz:

Publisher: publish.yml on davekch/monitor-gitlab-jobs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file monitor_gitlab_jobs-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for monitor_gitlab_jobs-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65a4670b36bd0386d3f75a611800a072948b1f968c9e7c491603c3fb8626c844
MD5 d15d463e75ac2a29540d9e4c8a05a1e5
BLAKE2b-256 983d98b8af812d4f436f72f3faea974e97e1c73f2d9285f6849bfb8eb7b8f74a

See more details on using hashes here.

Provenance

The following attestation bundles were made for monitor_gitlab_jobs-0.2.0-py3-none-any.whl:

Publisher: publish.yml on davekch/monitor-gitlab-jobs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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