Introduction to Pipelines

Pipelines are an organized group of stages and steps for automating any number of tasks within a hub based on a trigger.

Generally, pipelines are used for automating container deployments, but can be utilized for orchestrating complex sequences that affect entire clusters. This type of automation is generally known as GitOps.

Anatomy of a Pipeline

Pipelines are divided into stages, containing a series of steps.

Pipeline
Stage 1
Stage 2
Stage 3
Step 1
Step 2
Step 1
Step 2
Step 1
Step 2

Pipeline Runs

Each invocation of a pipeline is referred to as a run. The run data encapsulates all pipeline variables and data about the pass/fail for each stage and step.

Pipeline runs also capture the time of the run.

Stages

Stages are intended to be a logical grouping of steps to achieve a goal.

Planned Feature

Pipeline stages are planned to be run concurrently at some point in the future.

Steps

Steps are the specific tasks that the pipeline will execute when run. Steps within a stage are run in series.

For a complete list of all available steps and their details, see here.

Trigger Keys

Trigger keys are used to begin a run of a pipeline. Trigger keys are simply an HTTP endpoint and a secret that can be called from anywhere that has internet access. This provides ultimate flexibility, while the pipeline can be tailored specifically to dealing with the Cycle-side of a deployment.

curl https://api.cycle.io/v1/pipelines/<pipeline ID>/trigger \
    -H "Content-Type: application/json" \
    -d '{ "secret": "$TRIGGER_KEY_SECRET" }' \
    -X POST

Example Workflow

If using Github Actions, the action can focus on testing the newly submitted code, building and pushing a docker image to a registry, then calling the trigger key via cURL to start the deployment on Cycle. From there, the pipeline will automate importing the image, and deploying or reimaging a container.

ACLs

Pipelines have full support for role based ACLs.

Get Started with Pipelines