Skip to main content

Useful tool to show Gitlab pipeline as mermaid

Project description

Pipeline as mermaid

Coverage report PyPI version Pipeline License: MIT

Useful tool to show Gitlab pipeline as mermaid

required environments

  • GITLAB_API_TOKEN - gitlab api token

Using

Show current pipeline in merge request notes. Example merge request

in .gitlab-ci.yml

notify merge request:
  image: registry.gitlab.com/nov1kov/pipeline_to_mermaid:0.4
  stage: deploy
  only:
    - merge_requests
  script:
    - pipeline-mermaid show_current_pipeline

as python package

install

pip install pipeline-mermaid

show current pipeline in current merge request as gantt diagram

pipeline-mermaid show_pipeline

show specific pipeline in specific merge request as gantt diagram

pipeline-mermaid show_pipeline 249125838 gantt 3 

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

  • using as python library

gitlab

  • try depend on CI_JOB_TOKEN

mermaid

documentaion

ci tools

0.4

  • global command "pipeline-mermaid"
  • custom message ability

0.3

  • support repeated jobs

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.4.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

pipeline_mermaid-0.4-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file pipeline_mermaid-0.4.tar.gz.

File metadata

  • Download URL: pipeline_mermaid-0.4.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for pipeline_mermaid-0.4.tar.gz
Algorithm Hash digest
SHA256 90aa18fc3981240e550184ae4aa1946f555c2102a269982319a177605ce944bd
MD5 705bde1f03319b97abfb17699ae897c6
BLAKE2b-256 5e43e05310cafda89bf7e3311daca3891cd352eb380453e3da961d21d80e4db5

See more details on using hashes here.

File details

Details for the file pipeline_mermaid-0.4-py3-none-any.whl.

File metadata

  • Download URL: pipeline_mermaid-0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for pipeline_mermaid-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a582fde3a08e1a1618ce0d0eb859bf3c9bae267bd1c3632c4c2360926243ca46
MD5 39d2d6e40dadaedd7f03942bf9f81626
BLAKE2b-256 6282e40c68b37d3df76fa884878c48fc2cb98ad40909ba25c248f5946b444af5

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