Skip to main content

Continuous Integration Catalog Interface

Project description

saferatday0 cici

pipeline status coverage report latest release pre-commit code style: black imports: isort code style: prettier

cici (Continuous Integration Catalog Interface) is a pipeline component packaging tool. Author one CI configuration enriched with metadata, and cici:

  • Bundles into individual, self-contained job files for distribution

  • Pins pipeline dependencies to their latest releases

  • Documents pipelines automatically

cici helps teams maintain reusable CI templates that are versioned, documented, and distributed as artifacts.

cici is a foundational component of saferatday0 and powers the saferatday0 library.

How It Works

cici introduces a project-level configuration that manages actual CI pipeline files. This config declares:

  • Targets — named pipeline jobs with metadata (descriptions, groups, tags, container images)

  • Variables — input variables with descriptions, defaults, and examples

  • Groups — logical groupings of targets

  • Metadata — project name, repo URL, descriptions

The tool then uses this higher-level config alongside provider-specific CI/CD files (currently only .gitlab-ci.yml) to bundle, document, and manage pipeline components.

Installation

pip install cici-tools

Usage

cici bundle

Splits a multi-job CI file into standalone, per-job YAML files — each job gets its own distributable .yml with all dependencies resolved (extends expanded, variables merged, containers injected).

cici bundle

Use -o/--output to select an output format (defaults to gitlab:include). Pass -o multiple times to generate several formats in one invocation:

cici bundle -o gitlab:include

The output format can also be controlled via the CICI_OUTPUTS environment variable (comma-separated for multiple formats):

CICI_OUTPUTS=gitlab:include cici bundle
$ cici bundle
⚡ update gitlab:include python-autoflake.yml
⚡ update gitlab:include python-black.yml
⚡ update gitlab:include python-build-sdist.yml
⚡ update gitlab:include python-build-wheel.yml
⚡ update gitlab:include python-import-linter.yml
⚡ update gitlab:include python-isort.yml
⚡ update gitlab:include python-mypy.yml
⚡ update gitlab:include python-pyroma.yml
⚡ update gitlab:include python-pytest.yml
⚡ update gitlab:include python-setuptools-bdist-wheel.yml
⚡ update gitlab:include python-setuptools-sdist.yml
⚡ update gitlab:include python-twine-upload.yml
⚡ update gitlab:include python-vulture.yml

cici update

Pins GitLab CI include: references to the latest release tag of the included project. This is fetched from the GitLab API, and results are cached for 12 hours:

cici update
$ cici update
⚡ update gitlab:include saferatday0/library/python 0.1.0 → 0.5.1
⚡ update gitlab:include saferatday0/library/gitlab 0.1.0 → 0.2.2

You can ignore the cache and always pull the latest with -f:

cici update -f

cici readme

Auto-generates a README.md from your .cici/config.yaml using Jinja2 templates:

cici readme

To customize the output, place a README.md.j2 in your project's .cici/ directory:

# {{ name }} pipeline

{%- include "brief.md.j2" %}
{%- include "description.md.j2" %}

{%- include "groups.md.j2" %}

{%- include "targets.md.j2" %}

{%- include "variables.md.j2" %}

cici schema

Emits a JSON Schema for the .cici/config.yaml format, which can be used for editor validation and autocompletion:

cici schema
cici schema --format yaml -o schema.yaml

Configuration

Project Config (.cici/config.yaml)

Defines pipeline component metadata, targets, and variables:

name: my-pipeline
brief: A reusable CI/CD pipeline component.

targets:
  - name: lint
    brief: Run linters.
    container:
      image: python:3.12

  - name: test
    brief: Run tests.
    container:
      image: python:3.12

variables:
  PYTHON_VERSION:
    brief: Python version to use.
    default: "3.12"

Targets can also live in separate files under .cici/targets/*.yaml.

User Config (~/.config/cici-tools/config.ini)

Controls GitLab connection and caching:

# ~/.config/cici-tools/config.ini
CICI_GITLAB_URL=https://gitlab.com
CICI_GITLAB_PRIVATE_TOKEN=glpat-...
CICI_CACHE_TIMEOUT=43200

License

Copyright 2024-2026 UL Research Institutes.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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

cici_tools-0.22.0.tar.gz (113.6 kB view details)

Uploaded Source

Built Distribution

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

cici_tools-0.22.0-py3-none-any.whl (66.8 kB view details)

Uploaded Python 3

File details

Details for the file cici_tools-0.22.0.tar.gz.

File metadata

  • Download URL: cici_tools-0.22.0.tar.gz
  • Upload date:
  • Size: 113.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for cici_tools-0.22.0.tar.gz
Algorithm Hash digest
SHA256 ca880d3eab2a5206041f8e851340e70d4e18df1fe32daea0ecfb4a02a2ff8c98
MD5 d6be9001a0f86d34218688b0af054f81
BLAKE2b-256 1887cfcb6f11608b8e652c0d0362b20d5a8da878e8f94e04612f0c001b52583d

See more details on using hashes here.

File details

Details for the file cici_tools-0.22.0-py3-none-any.whl.

File metadata

  • Download URL: cici_tools-0.22.0-py3-none-any.whl
  • Upload date:
  • Size: 66.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for cici_tools-0.22.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f0af510b0253d8f5bdb4e427433cbed5c5fb94086be04d3a211ac9bb05ea71d5
MD5 77e96eed351c9a11d0eff5a4313d5755
BLAKE2b-256 235b0b7a3141e4b163eebae3f0fb36081eb0bfc677082c538302b0d1deab511d

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