Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow loading multiple yaml documents from a single file #4821

Open
3 tasks done
NRUB opened this issue Feb 8, 2025 · 0 comments
Open
3 tasks done

Allow loading multiple yaml documents from a single file #4821

NRUB opened this issue Feb 8, 2025 · 0 comments
Labels
feature add new functionality

Comments

@NRUB
Copy link

NRUB commented Feb 8, 2025

Clear and concise description of the problem

It would be nice if we could define all our pipelines in a single .woodpecker.yaml file, instead of resorting to holding multiple pipelines in individual files in a dedicated folder. YAML syntax allows for multiple documents to be contained in a single stream by separating them with '---' (triple hyphens). Woodpecker currently doesn't utilized this feature when loading pipelines, since it's the file URI that is passed to - for example - 'genItemForWorkflow' that produces a single item from a single file, even if that file contains multiple documents.

Suggested solution

Allow for including multiple YAML documents within a single file.

This would require a change in some interfaces that currently take a file URI and pass it down to be processed by specialized functions first and extracting a list of YAML documents.

Alternative

No response

Additional context

Here are two relevant links to YAML official specification
2.2 Structures
4.3.1 Document

Validations

  • Checked that the feature isn't part of the next version already [https://woodpecker-ci.org/versions]
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
@NRUB NRUB added the feature add new functionality label Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature add new functionality
Projects
None yet
Development

No branches or pull requests

1 participant