One pipeline reconfiguring another

This is a way to ensure a pipeline stays up to date with its definition in a source code repository, eliminating the need to manually run fly set-pipeline.

- name: booklit
  type: git
  source: uri: https://github.com/vito/booklit
- name: reconfigure
  - get: booklit
    trigger: true
  - set_pipeline: booklit
    file: booklit/ci/pipeline.yml set_pipeline step

The set_pipeline step was introduced in Concourse v5.8.0. It is considered an experimental feature, until its associated RFC is resolved.

Configures a Concourse pipeline.

set_pipeline: string

Required. The name of the pipeline to configure.

file: string

Required. The path to the pipeline's configuration file.

file points at a .yml file containing the pipeline configuration, which allows this to be tracked with your resources.

The first segment in the path should refer to another source from the plan, and the rest of the path is relative to that source.

For example, if in your plan you have the following get step:

- get: something

And the something resource provided a pipeline.yml file, you would set file: something/pipeline.yml.

vars: object

Optional. A map of template variables to pass to the pipeline config.

For example, a var may be statically passed like so:

- get: my-repo
- set_pipeline: configure-the-pipeline
  file: my-repo/ci/pipeline.yml
    text: "Hello World!"

This means that any ((vars)) in the pipeline will be resolved using this field. For example, if my-repo/ci/pipeline.yml looks like

- name: task-image
    type: docker-image
      repository: my.local.registry:8080/my/image
      username: ((myuser))
      password: ((mypass))
- name: job
  - get: task-image
  - task: do-stuff
    image: task-image
      platform: linux
        path: echo
        args: ["((text))"]

...this will resolve "((text))" to "Hello World!", while ((myuser)) and ((mypass)) will be resolved in runtime via a credential manager, if it has been configured.

Note that variables set with this field will not propagate to tasks configured via file. If you want those variables to be determined at the time the pipeline is set, use vars as well.

var_files: [string]

Optional. A list of paths to .yml files that will be passed to the pipeline config in the same manner as the --load-vars-from flag to fly set-pipeline -- this means that if a variable appears in multiple files, the value from a file that is passed later in the list will override the values from files earlier in the list.