Competing Solutions

Each feature group has competitors solving a part of its task; none of them reads pipeline files and pipeline runs into one model, which a Sphinx domain and the visualizations build on.

A pipeline becomes a trace by the GitLab receiver of the OpenTelemetry Collector, fed by GitLab’s webhooks.

Pipeline Files

No package on PyPI reads a .gitlab-ci.yml into a Python object model. The packages below check a pipeline file, or write one.

JSON Schema

Source: GitLab’s own schema of a pipeline file, which its pipeline editor uses, checked by e.g. check-jsonschema, compared to Pipeline File.

Disadvantages

  • A file is validated against the schema. A program reading it gets nested dictionaries and lists.

  • The schema knows neither the line of an element nor its parent, and doesn’t resolve extends, include or !reference.

Advantages

  • The schema is GitLab’s, so a file is checked the same way as in GitLab’s pipeline editor.

Linters

Source: gitlab-ci-verify and gitlab-lint, compared to Pipeline File.

Disadvantages

  • Command line programs reporting findings, not a model. gitlab-lint sends the file to GitLab’s API to be checked; gitlab-ci-verify runs a compiled program installed from PyPI.

Advantages

  • gitlab-ci-verify checks a job’s scripts with ShellCheck, and both check a file against GitLab itself.

Pipeline Generators

Source: gcip (the GitLab CI Python Library), compared to Pipeline File.

Disadvantages

  • It writes a pipeline file from Python code, but doesn’t read one.

  • Five dependencies: boto3, pyaml, setuptools-git-versioning, semver and python-gitlab.

Advantages

  • A dynamic pipeline - e.g. for a child pipeline - is generated by a program instead of being written by hand.

Pipeline Runs

python-gitlab

Source: python-gitlab, on PyPI as python-gitlab, compared to Pipeline Run and Pipeline Trace Diagram.

Disadvantages

  • Two dependencies: requests and requests-toolbelt; licensed under the LGPL-3.0.

  • A pipeline’s jobs and bridges are flat lists of ProjectPipelineJob and ProjectPipelineBridge objects in the shape of the REST API’s payloads. A matrix is only part of a job’s name - test: [3.14, linux] -, a child pipeline is read with its own request, and a pipeline is not converted into a trace.

Advantages

  • The whole REST and GraphQL API, including writes like retrying a job or starting a pipeline.

Pipeline Documentation

gitlab-ci-docs

Source: gitlab-ci-docs, on PyPI as gitlab-ci-docs, compared to the glci domain.

Disadvantages

  • A command line program writing an HTML table of the workflow section’s variables into a README.md, not a part of a Sphinx build.

  • A variable’s type, options and whether it is required are written as a comment of its own format behind the variable, not taken from GitLab’s spec:inputs or a variable’s description and options.

Advantages

  • The README.md is rendered by GitLab itself, next to the pipeline file.