r/devops • • Sep 09 '26

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.

122 Upvotes

161 comments sorted by

View all comments

47

u/Due-Consequence9579 Sep 09 '26

Suffering. And 50 commits that get progressively more desperate for it to just fucking work.

8

u/aloofhoneybee68 Sep 09 '26

definitely felt that progressive desperation 😭

5

u/Due-Consequence9579 Sep 09 '26

If something gets “really” complicated you can look at authoring a reusable action in type script for better testing and control flow. There is a complexity jump for people not in the know when you do that though, so use with caution. My default at this point is a composite reusable action with everything in bash. Then you can test the scripts independently of a larger workflow and just have the yaml be integration glue.

2

u/RowbotWizard Sep 09 '26

I like this approach. I’ve definitely hit the point where enforcing some team conventions requires complex CI actions and a reusable custom action would be better for testing than some inline bash scripts.

0

u/Senojpd Sep 09 '26

Dude just use an llm. Nobody writes code anymore.

3

u/happy_hawking Sep 09 '26

But that's less an YAML issue than an IaC issue in general.

3

u/AbbreviationsFar4wh Sep 09 '26

Linter?

1

u/Due-Consequence9579 Sep 09 '26

Linting can catch some parsing errors in GHAs, but there’s an annoying amount of coupling that isn’t able to be encoded into syntax rules. There are some tools that allow you to test GHA locally in the simple cases but those quickly fall over once you start integrating with external services. And ultimately how it runs in the CI runner is the final arbiter… and only way to do that is commit and push.

2

u/Dr_Passmore Sep 10 '26

You are not a devops engineer without the 30 failed pipeline runs setting up a new pipeline

2

u/corship Sep 10 '26

I don't know man, just run the pipeline locally...

1

u/widowhanzo Sep 10 '26

How?

1

u/corship Sep 10 '26

Depends on you setup obviously...

Usually set up the same runners in your local machine and you're good to go.

For example: https://github.com/firecow/gitlab-ci-local

1

u/TehBens Sep 11 '26

A good starting place is not using ADOS, where that's generally not possible.

So you need modern/sane tooling that allows you to do so. Otherwise, you might be out of luck.

1

u/BritannicStClair Sep 10 '26

This makes me feel human. I thought I was the only one.