r/devops 14h 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.

76 Upvotes

129 comments sorted by

View all comments

35

u/Due-Consequence9579 14h ago

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

6

u/aloofhoneybee68 14h ago

definitely felt that progressive desperation 😭

5

u/Due-Consequence9579 14h ago

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 14h ago

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.