Get the status of your GitLab pipelines.
Project description
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,
"test_project": 123456789
},
"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": 23234375
). 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 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 │ ╘═════════════════╧═════════════════════════════════════════════════╧════════╧══════════╧═════════╧════════════╛
-
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 │ ╘═════════════════╧════════════════════╧════════╧══════════╧═════════╧════════════╛
-
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 │ ╘═════════════════╧═════════════════════════════════════════════════╧════════╧══════════╧═════════╧════════════╛
-
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 │ - │ ╘═════════════════╧═════════════════════════════════════════════════╧════════╧══════════╧═════════╧════════════╛
-
Use a non-default configuration file:
$ pipe-stat parallel -f ./pipe_stat $ # or $ pipe-stat parallel -f ~/Downloads/some_file
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
Built Distribution
Hashes for pipe_stat-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fa83198ac59146f3c95635e81c837bb52bd217fe249f2ded0efd2c79875571f |
|
MD5 | ade2d21ec30a4254d56ae5f9cbf5dddd |
|
BLAKE2b-256 | a329e48daac840247dc916b5b29fee816451255e84a1bd7798c92dc7c5389660 |