this post was submitted on 13 Nov 2024
268 points (97.9% liked)
Programmer Humor
19593 readers
467 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Time for the yearly barrage of "Setup CI"..."Fix CI" commits.
That is my experience with basically every CI service out there.
Normally, you don't want to commit code unless it's been at least minimally tested, and preferably more than that.
All the CI's, however, force a workflow where you can only test it by committing the code and seeing if it works. I'm not sure how to fix that, but I see the problem.
Here's my hot tip! (ok maybe luke warm)
Write as much of your CICD in a scripting language like bash/python/whatever. You'll be able to test it locally and then the testing phase of your CICD will just be setting up the environment so it has the right git branches coined, permissions, etc.
You won't need to do 30 commits now, only like 7! And you'll cry for only like 20 minutes instead of a whole afternoon!
Aggressively seconding this. If you can just do a step in a bash command, do that, don't use the stupid yaml wrapper they provide that actually just turns around and runs the same bash command but with extra abstraction to learn, break, fix, and maintain for stupid, meaningless upgrades. It will save you time because you'll be using better-tested, more widely-used tools and approaches.