Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

Support for YAML aliases #67

Closed
ineffyble opened this issue Feb 25, 2019 · 3 comments
Closed

Support for YAML aliases #67

ineffyble opened this issue Feb 25, 2019 · 3 comments

Comments

@ineffyble
Copy link
Contributor

Something I've found very helpful with writing build pipelines for GoCD is using YAML aliases - which let you define a block of code (an object or array) once, and then reuse it in multiple places, without rewriting.

This would be very useful for helping to make our batect.yml smaller and more readable (it's currently over 600 lines!).

I tried to use a YAML alias, but got a message that YAML aliases are not supported by whichever YAML parser you're currently using.

@charleskorn
Copy link
Collaborator

it's currently over 600 lines!

😱

I tried to use a YAML alias, but got a message that YAML aliases are not supported by whichever YAML parser you're currently using.

This makes sense to me as something to add support for. I'm also interested in both why your config is so big and what is duplicated - are you able to share an example so I can understand how you would want to use this?

@ineffyble
Copy link
Contributor Author

I think #58 might solve a lot of the use cases I'd have for aliases

charleskorn added a commit to charleskorn/kaml that referenced this issue Mar 4, 2019
This goes some way towards resolving
batect/batect#67.
@charleskorn
Copy link
Collaborator

Hi @ineffyble, thanks again for all your feedback. I've just added support for YAML aliases and anchors, and it will be part of v0.27 (which I'm planning to release soon).

There will be a bunch of examples of this on the configuration docs page once I push out the release later today.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants