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.
-
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 gitlab ╒═══════════════════╤══════════════════════════════╤══════════════╤══════════╤═══════════╤════════════════╕ │ Project │ Commit │ User │ Status │ User │ Finished │ ╞═══════════════════╪══════════════════════════════╪══════════════╪══════════╪═══════════╪════════════════╡ │ gitlab-org/gitlab │ Merge branch '293679_intr... │ minac │ running │ post-qa │ - │ ├───────────────────┼──────────────────────────────┼──────────────┼──────────┼───────────┼────────────────┤ │ gitlab-org/gitlab │ Merge branch '36046-extra... │ vshushlin │ running │ post-test │ - │ ├───────────────────┼──────────────────────────────┼──────────────┼──────────┼───────────┼────────────────┤ │ gitlab-org/gitlab │ Merge branch '254325-remo... │ avielle │ running │ post-qa │ - │ ├───────────────────┼──────────────────────────────┼──────────────┼──────────┼───────────┼────────────────┤ │ gitlab-org/gitlab │ Merge branch 'hchouraria-... │ hchouraria │ failed │ review │ 12 minutes ago │ ├───────────────────┼──────────────────────────────┼──────────────┼──────────┼───────────┼────────────────┤ │ gitlab-org/gitlab │ Merge branch 'increase_di... │ igor.drozdov │ running │ post-qa │ - │ ├───────────────────┼──────────────────────────────┼──────────────┼──────────┼───────────┼────────────────┤ │ gitlab-org/gitlab │ Merge branch 'only-render... │ euko │ running │ test │ - │ ├───────────────────┼──────────────────────────────┼──────────────┼──────────┼───────────┼────────────────┤ │ gitlab-org/gitlab │ Refactor pages feature sp... │ vshushlin │ running │ test │ - │ ├───────────────────┼──────────────────────────────┼──────────────┼──────────┼───────────┼────────────────┤ │ gitlab-org/gitlab │ Add allowed to push super... │ marc_shaw │ running │ post-qa │ - │ ├───────────────────┼──────────────────────────────┼──────────────┼──────────┼───────────┼────────────────┤ │ gitlab-org/gitlab │ Merge branch 'a_akgun-mas... │ gitlab-bot │ running │ pages │ - │ ├───────────────────┼──────────────────────────────┼──────────────┼──────────┼───────────┼────────────────┤ │ gitlab-org/gitlab │ Merge branch '295625-incl... │ dbalexandre │ failed │ post-test │ 5 minutes ago │ ╘═══════════════════╧══════════════════════════════╧══════════════╧══════════╧═══════════╧════════════════╛
-
Get the most recent failed pipelines for the project
parallel:$ pipe-stat gitlab -s failed ╒═══════════════════╤══════════════════════════════╤═════════════════════╤══════════╤═══════════╤════════════════╕ │ Project │ Commit │ User │ Status │ User │ Finished │ ╞═══════════════════╪══════════════════════════════╪═════════════════════╪══════════╪═══════════╪════════════════╡ │ gitlab-org/gitlab │ Merge branch 'hchouraria-... │ hchouraria │ failed │ review │ 13 minutes ago │ ├───────────────────┼──────────────────────────────┼─────────────────────┼──────────┼───────────┼────────────────┤ │ gitlab-org/gitlab │ Merge branch '295625-incl... │ dbalexandre │ failed │ post-test │ 6 minutes ago │ ├───────────────────┼──────────────────────────────┼─────────────────────┼──────────┼───────────┼────────────────┤ │ gitlab-org/gitlab │ Merge branch 'only-render... │ euko │ failed │ post-qa │ 31 minutes ago │ ├───────────────────┼──────────────────────────────┼─────────────────────┼──────────┼───────────┼────────────────┤ │ gitlab-org/gitlab │ Merge branch '7749-rolldo... │ acroitor │ failed │ post-qa │ 12 minutes ago │ ├───────────────────┼──────────────────────────────┼─────────────────────┼──────────┼───────────┼────────────────┤ │ gitlab-org/gitlab │ Merge branch '285509-glob... │ tnir │ failed │ post-qa │ 27 minutes ago │ ├───────────────────┼──────────────────────────────┼─────────────────────┼──────────┼───────────┼────────────────┤ │ gitlab-org/gitlab │ Merge branch '295625-incl... │ tnir │ failed │ post-test │ 38 minutes ago │ ├───────────────────┼──────────────────────────────┼─────────────────────┼──────────┼───────────┼────────────────┤ │ gitlab-org/gitlab │ Merge branch '229708-migr... │ pgascouvaillancourt │ failed │ post-qa │ 47 minutes ago │ ├───────────────────┼──────────────────────────────┼─────────────────────┼──────────┼───────────┼────────────────┤ │ gitlab-org/gitlab │ Fix lint errors... │ nmilojevic1 │ failed │ post-qa │ 37 minutes ago │ ├───────────────────┼──────────────────────────────┼─────────────────────┼──────────┼───────────┼────────────────┤ │ gitlab-org/gitlab │ Fix gitlab pot... │ nmilojevic1 │ failed │ post-qa │ 2 hours ago │ ├───────────────────┼──────────────────────────────┼─────────────────────┼──────────┼───────────┼────────────────┤ │ gitlab-org/gitlab │ Use getters for derived p... │ euko │ failed │ post-qa │ 3 hours ago │ ╘═══════════════════╧══════════════════════════════╧═════════════════════╧══════════╧═══════════╧════════════════╛
-
Get the most recent succeeded pipeline:
$ pipe-stat gitlab -s success -n 1 ╒═══════════════════╤══════════════════════════════╤════════╤══════════╤═════════╤════════════════╕ │ Project │ Commit │ User │ Status │ User │ Finished │ ╞═══════════════════╪══════════════════════════════╪════════╪══════════╪═════════╪════════════════╡ │ gitlab-org/gitlab │ Merge branch '288812-clea... │ 10io │ success │ post-qa │ 52 minutes ago │ ╘═══════════════════╧══════════════════════════════╧════════╧══════════╧═════════╧════════════════╛
-
Get currently running pipelines:
$ pipe-stat gitlab -s running ╒═══════════════════╤══════════════════════════════╤══════════════╤══════════╤═══════════╤════════════╕ │ Project │ Commit │ User │ Status │ User │ Finished │ ╞═══════════════════╪══════════════════════════════╪══════════════╪══════════╪═══════════╪════════════╡ │ gitlab-org/gitlab │ Merge branch '293679_intr... │ minac │ running │ post-qa │ - │ ├───────────────────┼──────────────────────────────┼──────────────┼──────────┼───────────┼────────────┤ │ gitlab-org/gitlab │ Merge branch '36046-extra... │ vshushlin │ running │ post-test │ - │ ├───────────────────┼──────────────────────────────┼──────────────┼──────────┼───────────┼────────────┤ │ gitlab-org/gitlab │ Merge branch '254325-remo... │ avielle │ running │ post-qa │ - │ ├───────────────────┼──────────────────────────────┼──────────────┼──────────┼───────────┼────────────┤ │ gitlab-org/gitlab │ Merge branch 'increase_di... │ igor.drozdov │ running │ post-qa │ - │ ├───────────────────┼──────────────────────────────┼──────────────┼──────────┼───────────┼────────────┤ │ gitlab-org/gitlab │ Merge branch 'only-render... │ euko │ running │ test │ - │ ├───────────────────┼──────────────────────────────┼──────────────┼──────────┼───────────┼────────────┤ │ gitlab-org/gitlab │ Refactor pages feature sp... │ vshushlin │ running │ test │ - │ ├───────────────────┼──────────────────────────────┼──────────────┼──────────┼───────────┼────────────┤ │ gitlab-org/gitlab │ Add allowed to push super... │ marc_shaw │ running │ post-qa │ - │ ├───────────────────┼──────────────────────────────┼──────────────┼──────────┼───────────┼────────────┤ │ gitlab-org/gitlab │ Merge branch 'a_akgun-mas... │ gitlab-bot │ running │ pages │ - │ ├───────────────────┼──────────────────────────────┼──────────────┼──────────┼───────────┼────────────┤ │ gitlab-org/gitlab │ Add invisible captcha app... │ alexbuijs │ running │ post-qa │ - │ ├───────────────────┼──────────────────────────────┼──────────────┼──────────┼───────────┼────────────┤ │ gitlab-org/gitlab │ Merge branch '295240-save... │ gitlab-bot │ running │ pages │ - │ ╘═══════════════════╧══════════════════════════════╧══════════════╧══════════╧═══════════╧════════════╛
-
Use a non-default configuration file:
$ pipe-stat parallel -f ./pipe_stat $ # or $ pipe-stat parallel -f ~/Downloads/some_file
Metadata
Release files for pipe-stat 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pipe_stat-0.0.6.tar.gz | 11.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pipe_stat-0.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.6 kB
Release files / pipe_stat-0.0.6.tar.gz
| Download URL | pipe_stat-0.0.6.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c2b523f48dba28537f399e48e952560aaff39358de765e26975a2ef0ef7e70f
|
|
BLAKE2b-256 checksum How to use checksums |
0445ed2be9f82979e10b29c943c802cd4b1ef98769e2eec6738ded06fad1d24e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / pipe_stat-0.0.6-py3-none-any.whl
| Download URL | pipe_stat-0.0.6-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e900ae340087153cbf4e0b91da687544a4d5b0c486276b0f620b4912fa2286ee
|
|
BLAKE2b-256 checksum How to use checksums |
e19cf347a260fd1f2026e78511a6cf834cb0462efea2b116e8a9402e72f8565c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for pipe-stat 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.