Yes, in terms of workflows and gcloud for instance, we have a lot of redundant code that I’d love to DRY up. Having standard YAML anchor behaviour would allow that.
If you read about concatenating yaml lists on stackoverflow there are various solutions people have come up with for adding in something like a custom merge directive so that you could do:
I assume we have no control over the intermediary steps between grabbing the config.yml and reading it, but I guess we could write the config in our own format then use a script to create the final yml file, but doesn’t sound ideal.
What would be really useful here is if CircleCI called a shell hook in the .circleci folder, maybe called config.sh. That would have a chance to rewrite the config.yml file in any way it wishes (e.g. using templates) and then Circle could then proceed.
Frankly, this would really help me right now. I have probably 10 different microservices in the same repo, and the only difference between their build processes is the Working Directory (and therefor my Persist to Workspace).
If you’re just looking to DRY up your config, just use a scripting language to build the YAML config file, and don’t edit the file directly. Just run your script to regen the config, and commit what it builds to Git.
Each to their own, I suppose, and I’m certainly happy to hear why you think that.
The thing with hosted CI is that unless one has trivial requirements, occasionally one has to workaround something, and that’s (usually) a minor price to pay for not having to maintain one’s own CI facility.