gcip2¶
gcip2 is a Python DSL for building GitLab CI/CD pipelines from strongly typed Pydantic models, and for running the automation those pipelines invoke.
Instead of maintaining large YAML files, pipelines are described in Python, validated against the official GitLab CI schema, and rendered to GitLab-compatible YAML. The same project defines tasks — named automation workflows that run identically from the command line and from a CI job.
Installation¶
uv add gcip2
Quick start¶
dothat run init # generate a minimal project
dothat run build-gitlab-ci # render .gitlab-ci.yml
dothat run build-pipeline # render out/pipeline.gitlab-ci.yml
dothat run init creates:
.
├── ci.py # pipeline and job definitions
├── environment.toml # project configuration
├── pyproject.toml
└── .pre-commit-config.yaml
How a task runs¶
A task declares what should happen; actions implement how. Everything below the CLI receives its configuration and services from a single container, so the same task definition works locally and in CI without duplicated logic.
Where to go next¶
Defining tasks, actions, and parameters |
|
Writing pipelines and jobs |
|
How configuration and services reach your code |
|
Generated reference for every module |