Useful tool to show Gitlab pipeline as mermaid
Project description
Pipeline as mermaid
Useful tool to show Gitlab pipeline as mermaid
install
pip install pipeline-mermaid
required environments
GITLAB_API_TOKEN
- gitlab api token
Using
in .gitlab-ci.yml
notify merge request:
stage: deploy
only:
- merge_requests
script:
- python -m pipeline_mermaid.gitlab_helper show_current_pipeline
Show current pipeline in merge request notes. Example merge request
Gitlab pipeline as mermaid
graph LR
classDef failed fill:white,stroke:#db3b21,color:black;
classDef success fill:white,stroke:#1aaa55,color:black;
classDef warning fill:white,stroke:#fc9403,color:black;
classDef skipped fill:white,stroke:#999,color:black;
730991283(android)
730991285(s3)
730991286(firebase)
730991287(slack)
730991283 --> 730991285
730991283 --> 730991286
730991285 --> 730991287
730991286 --> 730991287
class 730991283 success
class 730991285 warning
class 730991286 success
class 730991287 failed
gantt
dateFormat YYYY-MM-DDTHH:mm:ss.SSSZ
axisFormat %H:%M:%S
section test
unit tests : 730991283, 2020-09-12T12:26:05.370Z, 2020-09-12T12:26:41.665Z
section build
build : 730991284, 2020-09-12T12:26:42.182Z, 2020-09-12T12:27:38.126Z
section deploy
s3 : 730991285, 2020-09-12T12:27:43.757Z, 2020-09-12T12:28:35.406Z
firebase : 730991286, 2020-09-12T12:27:43.757Z, 2020-09-12T12:28:44.406Z
journey
section build
android: -1: running
ios: -1: running
section deploy
slack-android: -1: created
slack-ios: -1: created
todo:
README
- add .gitlab-ci.yml examples
- using as library
gitlab
- try depend on CI_JOB_TOKEN
mermaid
- interactions https://mermaid-js.github.io/mermaid/diagrams-and-syntax-and-examples/gantt.html#interaction
- state
documentaion
- https://pdoc3.github.io/pdoc/
- https://pydoc-markdown.readthedocs.io/en/latest/docs/api-documentation/processors/
ci tools
- https://gitlab.version.fz-juelich.de/vis/jusense-cicd/-/wikis/discussion-on-howto-include-badges-in-gitlab-...
- https://github.com/jongracecox/anybadge
- https://docs.gitlab.com/ee/api/wikis.html
- gitlab release versions
- pylint (show errors in MR)
0.2
- support journey diagram
- methods for using by one line
0.1
- Show gitlab pipeline as gantt diagram
- Show gitlab pipeline as graph LR
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
pipeline_mermaid-0.3.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for pipeline_mermaid-0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 183e78f27742cba06bf742ab71e9200c40ad569c3695dc93f103f010434136b6 |
|
MD5 | 508511d240a2b7c8accba2a9c194bc3c |
|
BLAKE2b-256 | 9f550cd86fddcd6f0f3cd2ee2e61864eb00f1579555b36ac5409e93123e33cd6 |