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
Flightplan requires fly
to be installed on path.
pip3 install flightplan
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 Pythonfp 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file flightplan-0.1.2.tar.gz
.
File metadata
- Download URL: flightplan-0.1.2.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90d94540c50e126e994d84027959381d36c486eb536e42d9c4d6a1d881f26633 |
|
MD5 | a55175895ddd637a9fbecf6648afa075 |
|
BLAKE2b-256 | f319bcb788d967d2647709e49a6c24aa6a63db73b43d3a1b70ae45d36845b5b8 |
File details
Details for the file flightplan-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: flightplan-0.1.2-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | c16f3a90fb68eb90579f9ec3d7e29c51a3e97fbe5d871e8fc6f8cc74d767ac08 |
|
MD5 | e21dc32cc98ecbd2ecab6e7e9b0b9ec4 |
|
BLAKE2b-256 | 3289ce03eea6a5eb07f830ebc97e21741ba66fca135cfd0075b35308176c49b4 |