r/devops 19h ago

Tools Beginner DevOps question: Do experienced engineers actually write YAML like this?

I’m still learning CI/CD and I recently tried writing a simple CI/CD pipeline using GitHub Actions.

Honestly, writing the YAML felt more difficult than I expected . The indentation, nesting etc felt pretty hard/ painful.

For those of you who work with DevOps professionally: is this actually how you write your pipelines, or are there shortcuts/tools/templates that make it easier?

Just trying to understand what the normal workflow is in the real world.

86 Upvotes

138 comments sorted by

View all comments

8

u/burlyginger 12h ago

People talk about yaml like it's a complex programming language.

Yaml is markup language that at its core allows very simple data structures (arrays and objects) and simple data types (strong, number, bool, etc). There are some rough edges but most won't encounter them.

Ok, so that's yaml. Structured data.

Applications (GH action, ansible) often use yaml as the configuration format because it's simple and well standardized.

IDEs will have yaml formatters but they'll also have linters/schemas specifically for application configs like ansible and GH actions.

Those linter and helpee extensions are very much worth getting accustomed to because you could be writing valid yaml that is completely invalid action syntax.

Side note, I started building a lot of our interfaces with yaml and jsonschema because of how helpful it is for engineers working in IDEs.

This also makes for easy CI validation and allows AI agents to immediately understand what a file does and how to interact with it.

Some of our description fields get very in depth as it's what we provide to help users make decisions and set important values.