concourse / concourse-pipeline-resource

!!! use the `set_pipeline` step instead !!!
https://concourse-ci.org/jobs.html#schema.step.set-pipeline-step.set_pipeline
MIT License
76 stars 42 forks source link

[Bug] Resource does not allow for an empty list of pipelines to be put #62

Open ari-becker opened 5 years ago

ari-becker commented 5 years ago

For the following config:

---
jobs:
- name: set-my-pipelines
  plan:
  - put: my-pipelines
    params:
      pipelines_file: path/to/pipelines/file.yaml

where the contents of path/to/pipelines/file.yaml are:

---
pipelines: []

Expected behavior: The put step silently succeeds, having done nothing because it was configured to do nothing.

Actual behavior: The put step fails with the following error: pipelines must be provided via either pipelines or pipelines_file

Context / use-case: we have a meta-pipeline which dynamically generates pipeline configurations for a variety of Concourse targets. Sometimes, only some of the Concourse targets have configurations generated for them, leaving the resources for the other Concourse targets with nothing to put. When this happens, it is intentional, and the build should not be failed.