Articles

DevOps

Shell scripts, CI/CD pipelines and the exit-code traps, pipe gotchas and quiet false positives that live in the plumbing between them.

Most of these notes share one thread: a command or a tool that reports success when the work did not happen.

Exit codes that lie. Bash $? after a failed if is 0. curl exits 0 on a 404 until you add --fail. grep's exit status is 0, 1 or 2, and a CI gate that grepped for the word FAILED passed a red build. A piped mysqldump | gzip made a 20-byte backup marked completed, and ln -s in Git Bash copies instead of linking and still exits 0.

Checks that mislead. A 403 is not a broken link when the site is refusing a script. Backticks inside a double-quoted shell string run as commands, which matters in commit messages.

Certificates. Does an HTTPS redirect break Let's Encrypt renewal? Usually not; a rule that changes the path, host or port does.

Search these 9 posts

Everything in DevOps