Closed MarkAmeryCurative closed 2 years ago
This is indeed an interesting use case, but - in addition to what you mentioned - you also have to take into account that some conatiner images define entrypoints that would cause this to be even more complicated to implement here.
That said, I don't think that is possible from this plugin's perspective... or any plugin for that matter. If you (or anyone) can think of a way to do this, re-open this or even create a PR with your suggestion!
My motivating use case: I'd like to make all our steps that use the
docker
plugin print each individual shell command they execute in Docker, so that when a step using thedocker
plugin fails or hangs, it's easy to tell which command it failed on.I can easily do this per-step by either adding
set -x
at the start of everycommand
or by overridingshell
to be["/bin/sh", "-e", "-c", "-x"]
. The trouble is, to do this across my company's entire repo, as far as I can tell I'd need to edit every step that usesdocker
, across all the Buildkite pipelines in our repository, and remember to do the same thing when adding moredocker
steps in future.It'd be great if, instead, there were some mechanism by which we could globally change the defaults. (I'm not sure whether other Buildkite plugins offer this kind of global configuration feature or what the patterns for it are, though, so I'm not sure what to recommend as far as implementation details go!)