Skip to content

WIP: ci-fairy: add the bashme command to convert a job's script to bash

Peter Hutterer requested to merge whot/ci-templates:wip/ci-fairy-bashme into master

One of the tricky bits with the CI is to make sure the script actually works. It's amazing how many typos one can put into that...

To make this easier to test, add a command to extract the script portions of a job into an actual shell script that can be run locally. By necessity, this script is incomplete since it won't have the various predefined variables the CI provides and it doesn't (at this point) have an implementation of extends:

To work around this, it will automatically load a gitlab-ci.preload script where it exists - you can put your CI logins and other global variables there.

Example usage: ci-fairy bashme --job='.fdo.container-build@alpine' templates/alpine.yml > mybashscript.sh

cc @bentiss, since we talked about this yesterday.

WIP because it doesn't have test cases yet.

Merge request reports

Loading