1.4.1 Setting Pipelines

Pipelines are configured entirely via the fly CLI. There is no GUI.

fly set-pipeline

To submit a pipeline configuration to Concourse from a file on your local disk you can use the -c or --config flag, like so:

$ fly -t example set-pipeline \
    --pipeline my-pipeline \
    --config pipeline.yml

This will present a diff of the changes and ask you to confirm the changes. If you accept then Concourse's pipeline configuration will switch to the pipeline definition in the YAML file specified.

Pipeline ((vars))

The pipeline configuration can contain template variables in the form of ((foo-bar)). They will be replaced with values populated by repeated --var, --yaml-var, or --load-vars-from flags, or at runtime via a credential manager.

This allows for credentials to be extracted from a pipeline config, making it safe to check in to a public repository or pass around.

For example, if you have a pipeline.yml as follows:

resources:
- name: private-repo
  type: git
  source:
    uri: git@...
    branch: master
    private_key: ((private-repo-key))

...you could then configure this pipeline like so:

$ fly -t example set-pipeline \
    --pipeline my-pipeline \
    --config pipeline.yml \
    --var "private-repo-key=$(cat id_rsa)"

Or, if you had a credentials.yml as follows:

private-repo-key: |
  -----BEGIN RSA PRIVATE KEY-----
  ...
  -----END RSA PRIVATE KEY-----

...you could configure it like so:

$ fly -t example set-pipeline \
    --pipeline my-pipeline \
    --config pipeline.yml \
    --load-vars-from credentials.yml

Concatenation is supported for string values - foo-((var)) with var: bar will resolve to foo-bar.

If both --var/--yaml-var and --load-vars-from are specified, the --var and --yaml-var flags take precedence.

Values other than strings (e.g. bools, arrays) may also be specified by using either --yaml-var or --load-vars-from.

fly validate-pipeline

To validate a local pipeline configuration without submitting it to Concourse, run validate-pipeline:

$ fly validate-pipeline --config pipeline.yml

By default, pipeline errors will cause validate-pipeline to fail, but warnings won't. To fail on both errors and warnings, pass the `--strict` flag.

fly format-pipeline

To format a pipeline config in a "canonical" form (i.e. keys are in normal order, with name first for example), run:

$ fly format-pipeline --config pipeline.yml

This will print the formatted pipeline config to stdout. To update the file in-place, pass --write/-w.