Skip to content

refactor: split scripts into separate files

Andrea Pappacoda requested to merge tachi/pipeline:separate-scripts-only into master

This patch splits each one of the pipeline steps into a separate .sh file. This is based on Ahmed's work in !528, but excludes the other improvements he has made.

To not block other pipeline improvement patches, as they would all need to rebase on this one, the scripts have been copied as they are into the .sh files, taking care of not making any cleanup:

  1. Scripts are run with bash, even when not needed, since Salsa was doing so already. Switching them to /bin/sh can be done in another patch.
  2. Scripts are invoked with the dot (".") command, so that they all run in the same environment, and all share the same variables. More care of imported/exported variables, and eventually dropping the dot command, can be done in another patch.
  3. Scripts run set -ex to print to stderr the invoked commands, and to exit with an error if any of the invoked commands fail. Making them more robust, changing the set to set -euxo pipefail, can be done in another patch.
  4. Yaml anchors and aliases (i.e. *anchor) have been replaced with the dot command, and this should lead to the same behaviour.

Co-authored-by: Ahmed Siam aahs.coder@gmail.com

Merge request reports

Loading