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.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.18.0
File Size Uploaded Provenance Actions
ol_concourse-0.18.0.tar.gz 68.4 kB Without provenance Details for ol_concourse-0.18.0.tar.gz

Built distribution (wheel)

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

Total release size: 128.6 kB

Release files / ol_concourse-0.18.0.tar.gz

Download URL ol_concourse-0.18.0.tar.gz
Size 68.4 kB
Tags Source
SHA-256 checksum
How to use checksums
426c30c75cc72f6c32729b91f873a1015e6989b88da580f145751b543958ea4b
BLAKE2b-256 checksum
How to use checksums
f0c711baf9431380e337676f3ac887a9130f6b5cb983752757d60f01b48c0c41
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.0-py3-none-any.whl

Download URL ol_concourse-0.18.0-py3-none-any.whl
Size 60.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
abe7f5b78dfa0c69008f5e98cc1c8e1ccb69da6dd1ca252651c35239c7ba79fa
BLAKE2b-256 checksum
How to use checksums
9fb3860c547aba2a94a1d30b98a39c0aa454332569c7e247681265120757584e
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.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.18.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