4 ms·
> pipelines can run locally on a developer machine as well (as much as possible at least) Facts. However I’ll go a step further and say “only implement your l
by forrestthewoods 2y ago
> pipelines can run locally on a developer machine as well (as much as possible at least)
Facts.
However I’ll go a step further and say “only implement your logic in a tool that has a debugger”.
YAML is the worse. But shell scripts are second worst. Use a real language.
- never_inline 2y agoPython with click and PyYAML can go a long way - then you can build it as a CLI application and use the same from CI. In a java shop, picocli + graalvm probably. I wouldn't like Go for this purpose (against the conventional wisdom - because boilerplate and pretty bad debugging capabilities). That said, if you absolutely need to use shell script for reasons, keep it all in single script, define logging functions including debug logs, rigorously check every constraint and variable, use shellcheck, factor the code well into functions - I should sometimes write a blog post about it.
- folmar 2y agoThere is a debugger for bash: https://github.com/Trepan-Debuggers/bashdb https://github.com/Trepan-Debuggers/bashdb Not that I'm recommending 10k-line programs in bash, but a debugger is useful when you need it.
- sgarland 2y agoShell is a very real language, and it has a debugger; it’s called set -x and/or strace.
- forrestthewoods 2y agoLike I said, use something with a real debugger.