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.18.1

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.18.1
File Size Uploaded Provenance Actions
ol_concourse-0.18.1.tar.gz 70.5 kB Without provenance Details for ol_concourse-0.18.1.tar.gz

Built distribution (wheel)

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

Total release size: 131.3 kB

Release files / ol_concourse-0.18.1.tar.gz

Download URL ol_concourse-0.18.1.tar.gz
Size 70.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5ef37da0ddb7fd878f5cdcb816c3fe85140c50724345184204c65a86aa4ea663
BLAKE2b-256 checksum
How to use checksums
63015664d6456dcda2525f44cd735880fce96ee5f6825701ca4b364c363fd53f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

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

Download URL ol_concourse-0.18.1-py3-none-any.whl
Size 60.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e5fa8c8762e61ef140e1e79053fdb3cc2ca83abc93cd6076a1a4024498ea9a4
BLAKE2b-256 checksum
How to use checksums
0bc408476d87be7d463c2478de6c6d4e2886946b873c0d724178b51c70340538
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for ol-concourse 0.18.1

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.18.1 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