Skip to content

About

Working with GitLab pipelines - workflow files, action files, convert pipeline runs to (OTLP) traces.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Sourcecode on GitHub Sourcecode License Documentation Documentation License
PyPI PyPI - Status PyPI - Python Version
GitHub Workflow - Build and Test Status Libraries.io status for latest release Codacy - Quality Codacy - Coverage Codecov - Branch Coverage

pyTooling.GitLab

pyTooling.GitLab works with GitLab CI/CD pipelines: it reads pipeline files (.gitlab-ci.yml) into a data model, reads the runs of a pipeline from GitLab's REST API, and converts them into traces - e.g. OpenTelemetry's OTLP/JSON or a Gantt chart of the jobs. A Sphinx domain glci documents a pipeline file's inputs and variables taken straight from the file.

It builds on pyTooling's generic CI pipeline model and tracing, and on pyTooling.Sphinx for its documentation extensions. Its sibling pyTooling.GitHub does the same for GitHub Actions.

Important

The Sphinx domain glci in pyTooling.GitLab.Sphinx requires pyTooling.Sphinx, and thus Python 3.12 or newer, because Sphinx 9.1 requires Python 3.12.

The package is installed from PyPI:

pip install pyTooling.GitLab

Features

Data models

  • Pipeline runs - A GitLab pipeline - its jobs, matrices and child pipelines with their times and outcomes - read from the GitLab REST API's payloads.
  • Pipeline files - A .gitlab-ci.yml and the files it includes: stages, jobs with their needs and rules, variables and inputs, read with line numbers, and converted into a pipeline graph.

Sphinx domain glci

The domain needs the extra sphinx, which installs pyTooling.Sphinx:

pip install pyTooling.GitLab[sphinx]
  • Pipelines and their parameters - A pipeline file's spec:inputs and its described variables, taken straight from the file; roles to reference them.
  • Summaries - Parameter tables, the interface, the dependencies and YAML excerpts of a pipeline file.

Visualization

  • Pipeline graph - The jobs of a pipeline file, their stages and needs as a Graphviz graph.
  • Pipeline trace diagram - Reads a pipeline through the GitLab REST API into a trace, written as OpenTelemetry's OTLP/JSON or drawn as a Gantt chart.

Program

Gantt charts need the extra diagram, which installs matplotlib:

pip install pyTooling.GitLab[diagram]
  • pytooling-gitlab - The command pipeline reads a pipeline into a trace, writes it, and draws it as a Gantt chart.

Contributors

License

This Python package (source code) is licensed under Apache License 2.0.
The accompanying documentation is licensed under Creative Commons - Attribution 4.0 (CC-BY 4.0).
Content of other projects - e.g. recorded pipelines of public gitlab.com projects as test data - is listed with its license in NOTICE.md.


SPDX-License-Identifier: Apache-2.0

About

Working with GitLab pipelines - workflow files, action files, convert pipeline runs to (OTLP) traces.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages