3 ms·
Yes definitely, many lines of shell in YAML (or Docker files) is one of my pet peeves. It's always better to invoke a shell script. Then you can use ShellChec
by chubot 6y ago
Yes definitely, many lines of shell in YAML (or Docker files) is one of my pet peeves. It's always better to invoke a shell script. Then you can use ShellCheck on it, your editor will syntax highlight it, you can parse it with Oil (osh -n) [1], etc.
And yes there shouldn't be too much of a difference between what developers do locally and what the CI does.
It's sort of an anti-pattern if you have a bunch of automation that can only the CI can run. The developer should be able to run it on their machine too, without CI, and without YAML ...
[1] http://www.oilshell.org/why.html#what-you-can-use-right-now http://www.oilshell.org/why.html#what-you-can-use-right-now