Reusable commands should support `when` attribute
Y
Yorgos Saslis
run
steps support the when
attribute: https://circleci.com/docs/2.0/configuration-reference/#the-when-attributegiven that the new "reusable commands" now available in 2.1 do a pretty good job of allowing us to group many
run
steps, it would be very convenient to allow commands
to also support the when
attribute (with same attributes).this way, I could essentially define groups of
run
steps under a single when
(on the command), rather than having to WET in my code.As an example, see CircleCI's own slack orb source code: https://github.com/CircleCI-Public/slack-orb/blob/master/src/%40orb.yml
this could be
dramatically
simplified given this feature. (Not to mention that in order for this orb to work, the BASH_ENV
hack is relied upon...)If there is any workaround for the above, any hints are welcome!!
Cheers,
Yorgos
CCI-I-789
Filip Malczak
I'm leaving it here just to follow the thread