Skip to main content

Code based description for Concourse pipelines

Project description

Flight plan - Plan your Concourse Pipeline with ease

AWS CDK like tool to code Concourse pipelines (with autocompletion.)

Why not stick with YAML

Writing YAML files feels not as heavy as XML, but still lacks the comfort of autocompletion and some kind of structuring (Beside anchors or tools like YTT).

The vision of Flightplan does not stop with replacing YAML, the real benefit starts with component libraries, which ease the setup of pipelines.

Furthermore these components can be updated, which make all improvements automatically available to all pipelines.

Features

  • Convert:
    • YAML -> Python
    • Python -> YAML
  • Fly integration
    • Set pipeline
    • Get pipeline
  • Shiped examples
    • Hello world
    • more to come

Disclaimer - Alpha

The package is still in alpha. Upcoming versions may include breaking changes.

Upcoming

  • Provide high level components that handle common use cases

Setup

Flightplan requires Python 3.8 and higher.

Install FlightPlan

pip3 install git+https://github.com/eruvanos/flightplan.git

Usage

If you start with Flightplan it is recommended to have a look on the quickstart examples, which are shipped within the cli.

If you want to migrate an existing pipeline you can use

  • fp import - to convert YAML to Python
  • fp get ... - to get and convert a running pipeline

Quickstart

Generate a basic pipeline example.

fp quickstart

Import existing pipeline file

Convert a pipeline yaml and render a flightplan .py file.

fp import <src.yaml> <target.py>

Import existing pipeline from fly

Convert a pipeline from fly and render a flightplan .py file.

fp get <fly_target> <pipeline_name> <target.py>

Static and dynamic vars will be imported as Var(str), if the type of the field is limited to an int or Enum type.

Synthesize yaml from flightplan .py file

fp synth <src.py> <target.yaml>

Direct Fly Set Pipeline

fp set <fly-target> <pipeline_name> <src.py>

Examples

Quickstart hello world example:

from flightplan.render import *

pipe = Pipeline(
    resource_types=[],
    resources=[],
    jobs=[
        Job(
            name="job-hello-world",
            public=True,
            plan=[
                Task(
                    task="hello-world",
                    config=TaskConfig(
                        platform="linux",
                        image_resource=ImageResource(
                            type="docker-image",
                            source=dict(repository="busybox", tag="latest"),
                        ),
                        run=Command(path="echo", args=["hello world"]),
                        inputs=[],
                        outputs=[],
                    ),
                )
            ],
        )
    ],
)

if __name__ == "__main__":
    print(pipe.synth())

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

flightplan-0.1.1.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

flightplan-0.1.1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file flightplan-0.1.1.tar.gz.

File metadata

  • Download URL: flightplan-0.1.1.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Darwin/19.6.0

File hashes

Hashes for flightplan-0.1.1.tar.gz
Algorithm Hash digest
SHA256 90f1760499bbc14a4afccd95decf2c6da00898f331b5b6fde090d164be795077
MD5 2758579cf307a2367ad63af79f603635
BLAKE2b-256 b4dc837ee6d1c0f6dd9ad650f2fdb94320cc0fbffca07e419ba1449775fe95ee

See more details on using hashes here.

File details

Details for the file flightplan-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: flightplan-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Darwin/19.6.0

File hashes

Hashes for flightplan-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6974ecab42bea9440dda709e75564bb851119fd87c95641bdc7a34fdd1f4b451
MD5 8ce56cf9357e25a74ff6b86389c01291
BLAKE2b-256 bc9e673ea9cdd53b1f0cde464da631c8522621590c5f23914c7ce5f1694b430e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page