Skip to main content

ol-concourse-lib

A Python DSL for programmatically building Concourse CI/CD pipelines.

Instead of writing YAML files by hand, use typed Python classes to construct type-safe pipeline definitions that serialize to valid Concourse pipeline YAML.

Installation

pip install ol-concourse-lib
# or with Pulumi job builder support:
pip install "ol-concourse-lib[pulumi]"

Quick Start

from ol_concourse.lib.models.pipeline import Identifier
from ol_concourse.lib.resources import git_repo, registry_image
from ol_concourse.lib.resource_types import packer_build
from ol_concourse.lib.jobs.infrastructure import packer_jobs
import yaml, json

# Build a pipeline fragment for packer AMI builds
code = git_repo(
    name=Identifier("packer-templates"),
    uri="https://github.com/myorg/packer-templates",
    branch="main",
)

fragment = packer_jobs(
    dependencies=[],
    image_code=code,
    node_types=["web", "worker"],
)

pipeline = fragment.to_pipeline()
print(yaml.dump(json.loads(pipeline.model_dump_json())))

API

Models (ol_concourse.lib.models)

  • Pipeline — root pipeline definition
  • Job, Resource, ResourceType — core pipeline components
  • GetStep, PutStep, TaskStep, InParallelStep — step types
  • TaskConfig, Command, Input, Output — task configuration
  • PipelineFragment — composable pipeline unit

Builder Functions

Module Functions
ol_concourse.lib.resources git_repo, registry_image, github_issues, schedule, s3_object, …
ol_concourse.lib.resource_types packer_build, packer_validate, pulumi_provisioner_resource, github_issues_resource, github_deployments_resource, release_resource_type, …
ol_concourse.lib.jobs.infrastructure packer_jobs, pulumi_jobs_chain, pulumi_job
ol_concourse.lib.containers container_build_task
ol_concourse.lib.notifications notification (Slack)
ol_concourse.lib.tasks instance_refresh_task, block_for_instance_refresh_task

Regenerating Pipeline Models

models/pipeline.py is generated from the Concourse pipeline JSON schema:

pip install datamodel-code-generator
datamodel-codegen \
    --url https://raw.githubusercontent.com/nicholasdille/concourse-jsonschema/main/concourse.json \
    --output src/ol_concourse/lib/models/pipeline.py \
    --output-model-type pydantic_v2.BaseModel

License

BSD-3-Clause — Copyright MIT Open Learning

Metadata

Release files for ol-concourse 0.20.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ol-concourse 0.20.0
File Size Uploaded Provenance Actions
ol_concourse-0.20.0.tar.gz 73.0 kB Without provenance Details for ol_concourse-0.20.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ol-concourse 0.20.0
File Interpreter ABI Platform Actions
ol_concourse-0.20.0-py3-none-any.whl Python 3 none any Details for ol_concourse-0.20.0-py3-none-any.whl

Total release size: 135.2 kB

Release files / ol_concourse-0.20.0.tar.gz

Download URL ol_concourse-0.20.0.tar.gz
Size 73.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2dd89f2ae22bd1b4ec75e7b980bc8a6d89767f81021c557dc17d8a54c1f9a66f
BLAKE2b-256 checksum
How to use checksums
534220d4be6c56578a31b0a1b494791b831a213c6b06cf5e85c038b48acabf1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / ol_concourse-0.20.0-py3-none-any.whl

Download URL ol_concourse-0.20.0-py3-none-any.whl
Size 62.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a65a12dd96d0d1bc4393a9a694b6a5db9d0f2b40da09a2e7e6f3425ccde37776
BLAKE2b-256 checksum
How to use checksums
d194fba9645acb8a8a343acee6044d6642bfdbf8fd966945bd7fa8eb75bbfd4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for ol-concourse 0.20.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.20.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page