Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

SAP-archive/pipeline-dsl

Repository files navigation

Important Notice

This public repository is read-only and no longer maintained.

Pipeline DSL for Concourse

downloads python pypi license

Features

  • Develop complete Concourse pipelines in plain Python
  • Test Pipelines inside Concourse without pushing them to github
  • Test Pipelines locally

Installation

Installation from PyPI

pip3 install pipeline-dsl

Installation from GitHub

pip3 install --upgrade git+https://github.com/sap/pipeline-dsl.git@main

Example

from pipeline_dsl import Pipeline, GitRepo

with Pipeline("c21s") as pipeline:
    pipeline.resource("shalm", GitRepo("https://github.com/wonderix/shalm"))
    with pipeline.job("create-cluster") as job:
        shalm = job.get("shalm")
        cluster_name = "test"

        @job.task()
        def create_shoot():
            print(f"Create cluster {cluster_name}")
            return cluster_name

        @job.task(secrets={"home": "HOME"})
        def install_shalm(home=None):
            print("HOME=" + home)
            print(f"Installing shalm {shalm.path} into {create_shoot()}")
            return "Hello"

Documentation