This script allows you to
- Do all the CI checks in parallel
- Give it check a name (and emojis π)
- Only show
stdout
andsterr
of the first one to fail - Stops the build on the first check failed
- Known which step is being checked (check Current Job perform explanation to reduce anxiety)
- Copy
checks.sh
andenqueJobs.sh
to your project - Give execute permisions to those files
chmod +x
- Remove examples from
checks.sh
- Add
enqueJob "[full commands with arguments inside double quotes]" "[Emojis and Name of the Step with spaces inside double quotes]"
- Repeat point 4 for each step you need to do
- Execute it, add it to your CI pipeline, and enjoy!
As all the checks run in the background and therefore in parallel, the script start waiting until the first job finish, then the second, etc...
The first one might take longer than the second, so in the output, you will see Waiting for Job 1 ...
but the second is done already, then you will see Waiting for Job 2 ...
and instantly you'll see Job 2 Done!
The idea of showing which process is being Waited is just to give some sort of output that the thing is doing something and show some progress to reduce anxiety, if not the whole thing would not output anything until the whole checks are done or something had failed.