Generate multiple steps from a single step


Let’s say an external tool is called as a run command, like this:

- run:
     name: Call my tool
     command: 'myToolName'

This will translate to one step and will be shown as one expander in the result.
Is it possible to emit some output from the external tool to CircleCI to create separate steps during the run, nested or otherwise.

Something like TeamCity’s service messages in mind, to create separate blocks:


You could run that command and pipe it into a script that writes to separate files. Then, in immediately following steps, cat each file in turn.


Thank you for your answer.

One of the purposes of using an external tool to do “batch” actions, would be to be able to write more readable and shorter configuration files. Unfortunately this solution would defeat this purpose.


I hear you. However, my strategy tends to be to get it working first, and then to polish. In practice I find I get a CI thing working, and then it doesn’t change for ages, and I forget to polish it :smiley_cat: