Skip to main content

Check your GitLab pipelines from the commandline

Install

The program is available on PyPi and can be installed via pip:

$ pip install pipe-stat

Config

This file is needed in order to use the program.

Example config:

{
  "projects": {
    "parallel": 23234375,
    "gitlab": 278964
  },
  "base_url": "https://gitlab.com",
  "access_token": "YOUR-TOKEN"
}

The application will look for a file named .pipe_stat in your home dir (~) and your current working dir (pwd) by default. This file must be an valid JSON file with the following entries:

  • projects: A mapping of <project_name:project_id> (some_project": 278964). You can name the project however you want. Just remember that the name will be used later when using the program (pipe-stat some_project). If you do not know your project id, you can get it from your projects GitLab page.
  • base_url: The base url of your gitlab instance. E.g. https://gitlab.com
  • access_token: A valid access token, that you can create on your gitlab site.

Usage

The following examples are based on the example configuration. So you might need to adjust the commands slightly.

  1. Get the last recent pipelines for the project parallel (remember that the program will use the name, that you gave it in the config file and not the real name):

    $ pipe-stat parallel
     ╒═════════════════╤═════════════════════════════════════════════════╤════════╤══════════╤═════════╤════════════╕
      Project          Commit                                           Ref     Status    Stage    Finished    ╞═════════════════╪═════════════════════════════════════════════════╪════════╪══════════╪═════════╪════════════╡
      M0r13n/parallel  Fixes tests and makes it work on Gitlab Runners  master  success   test     4 days ago  ├─────────────────┼─────────────────────────────────────────────────┼────────┼──────────┼─────────┼────────────┤
      M0r13n/parallel  Fixes tests and makes it work on Gitlab Runners  master  success   test     4 days ago  ├─────────────────┼─────────────────────────────────────────────────┼────────┼──────────┼─────────┼────────────┤
      M0r13n/parallel  Fixes tests and makes it work on Gitlab Runners  master  success   test     4 days ago  ├─────────────────┼─────────────────────────────────────────────────┼────────┼──────────┼─────────┼────────────┤
      M0r13n/parallel  Fixes tests and makes it work on Gitlab Runners  master  success   test     5 days ago  ├─────────────────┼─────────────────────────────────────────────────┼────────┼──────────┼─────────┼────────────┤
      M0r13n/parallel  Fixes tests and makes it work on Gitlab Runners  master  success   test     5 days ago  ├─────────────────┼─────────────────────────────────────────────────┼────────┼──────────┼─────────┼────────────┤
      M0r13n/parallel  Adds Gitlab runner                               master  failed    test     5 days ago  ╘═════════════════╧═════════════════════════════════════════════════╧════════╧══════════╧═════════╧════════════╛
    
  2. Get the most recent failed pipelines for the project parallel:

    $ pipe-stat parallel -s failed
     ╒═════════════════╤════════════════════╤════════╤══════════╤═════════╤════════════╕
      Project          Commit              Ref     Status    Stage    Finished    ╞═════════════════╪════════════════════╪════════╪══════════╪═════════╪════════════╡
      M0r13n/parallel  Adds Gitlab runner  master  failed    test     5 days ago  ╘═════════════════╧════════════════════╧════════╧══════════╧═════════╧════════════╛
    
  3. Get the most recent succeeded pipelines:

    $ pipe-stat parallel -s success
     ╒═════════════════╤═════════════════════════════════════════════════╤════════╤══════════╤═════════╤════════════╕
      Project          Commit                                           Ref     Status    Stage    Finished    ╞═════════════════╪═════════════════════════════════════════════════╪════════╪══════════╪═════════╪════════════╡
      M0r13n/parallel  Fixes tests and makes it work on Gitlab Runners  master  success   test     4 days ago  ├─────────────────┼─────────────────────────────────────────────────┼────────┼──────────┼─────────┼────────────┤
      M0r13n/parallel  Fixes tests and makes it work on Gitlab Runners  master  success   test     4 days ago  ├─────────────────┼─────────────────────────────────────────────────┼────────┼──────────┼─────────┼────────────┤
      M0r13n/parallel  Fixes tests and makes it work on Gitlab Runners  master  success   test     4 days ago  ├─────────────────┼─────────────────────────────────────────────────┼────────┼──────────┼─────────┼────────────┤
      M0r13n/parallel  Fixes tests and makes it work on Gitlab Runners  master  success   test     5 days ago  ├─────────────────┼─────────────────────────────────────────────────┼────────┼──────────┼─────────┼────────────┤
      M0r13n/parallel  Fixes tests and makes it work on Gitlab Runners  master  success   test     5 days ago  ╘═════════════════╧═════════════════════════════════════════════════╧════════╧══════════╧═════════╧════════════╛
    
  4. Get currently running pipelines:

     $ pipe-stat parallel -s running
     ╒═════════════════╤═════════════════════════════════════════════════╤════════╤══════════╤═════════╤════════════╕
      Project          Commit                                           Ref     Status    Stage    Finished    ╞═════════════════╪═════════════════════════════════════════════════╪════════╪══════════╪═════════╪════════════╡
      M0r13n/parallel  Fixes tests and makes it work on Gitlab Runners  master  running   test     -           ╘═════════════════╧═════════════════════════════════════════════════╧════════╧══════════╧═════════╧════════════╛
    
  5. Use a non-default configuration file:

     $ pipe-stat parallel -f ./pipe_stat 
     $ # or
     $ pipe-stat parallel -f ~/Downloads/some_file
    

Download files

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

Source Distribution

pipe_stat-0.0.4.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

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

pipe_stat-0.0.4-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file pipe_stat-0.0.4.tar.gz.

File metadata

  • Download URL: pipe_stat-0.0.4.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0.post20201221 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.5

File hashes

Hashes for pipe_stat-0.0.4.tar.gz
Algorithm Hash digest
SHA256 c1e0e6ee2210005f872548070640ca68ba04149d01aa44416afcd79be915f933
MD5 1a134066123508657999a1761094624f
BLAKE2b-256 8d89f5e71b266c44a5047054019d175dc9b41c0090f08d09b19e815e2f0a0f72

See more details on using hashes here.

File details

Details for the file pipe_stat-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: pipe_stat-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0.post20201221 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.5

File hashes

Hashes for pipe_stat-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e6d824bbf0b02d9eb3c594a90583ac6785865375607b4c0be634138b40ba593d
MD5 c9d4d6f0c8546f85d1e74afa3f7fe6ad
BLAKE2b-256 097467ec1c643ccd5c8c8e90240bd4fcae565948e604be509699b2f6bcb99aa1

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