]> git.ipfire.org Git - thirdparty/libvirt.git/commit
ci: build.sh: Add a wrapper function executing 'shell' commands
authorErik Skultety <eskultet@redhat.com>
Thu, 24 Aug 2023 13:45:44 +0000 (15:45 +0200)
committerErik Skultety <eskultet@redhat.com>
Tue, 12 Sep 2023 09:35:58 +0000 (11:35 +0200)
commit6214ae55f6a3ef6afd1ec986c9255e0dc7abc246
tree33668c22062cea05d6f9e6b12046ea9124ed1651
parentd3c6fb6a289592865eb3f6257dcd0a8d8cef6cb8
ci: build.sh: Add a wrapper function executing 'shell' commands

This would normally be not needed at all, but the problem here is the
Shell-in-YAML which GitLab interprets. It outputs every command that
appears as a line in the 'script' segment in a color-coded fashion for
easy identification of problems. Well, that useful feature is lost when
there's indirection and one script calls into another in which case it
would only output the respective script name which would make failure
investigation harder. This simple helper tackles that by echoing the
command to be run by any script/function with a color escape sequence
so that we don't lose track of the *actual* shell commands being run as
part of the GitLab job pipelines. An example of what the output then
might look like:
    [RUN COMMAND]: 'meson compile -C build install-web'

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
ci/build.sh