Github-action workflow runs can consume additional output "sugar" values
and use them to annotate output in the UI. When using the github
library, shadow the common-lib functions to add in this extra metadata.
Also, fix use of the debug calls so they are useful despite
ACTIONS_STEP_DEBUG being set or not.
Signed-off-by: Chris Evich <cevich@redhat.com>
When installing components other than `common`, the install script
chains to `.install.sh` files within the component subdirectories.
However, this was not done in a `set -e` environment possibly hiding
failures. Fix this by making the component install scripts executable
and `set -eo pipefail`.
Signed-off-by: Chris Evich <cevich@redhat.com>
It was an unfortunate mistake to name this variable as such. It was
observed to collide with other non-conforming usages in downstream.
This was esp. leading to some difficult to debug situations, such as
https://github.com/containers/podman/issues/13932 The common
automation library is used far/wide by many environments, which
unfortunately may also rely on a generic `$DEBUG`. Fix the issue here,
by renaming the variable.
Let this serve as a warning to all downstream, everywhere: ***Avoid all
use of similar generic variable names, make them context-specific!***
Signed-off-by: Chris Evich <cevich@redhat.com>
In nearly all use-cases, users of the automation libraries/tools need to
both load and export variables in this file. Otherwise loading
additional libraries (which depend on the variables) will fail. Make
this easier on downstream users by exporting important variables in-line
in this file.
Signed-off-by: Chris Evich <cevich@redhat.com>
Previously due to practical reasons, the unit-tests did a very poor
jobs checking the code-context information shown by functions like
`die()`. Prior to this commit, the stack-level used was too great,
resulting in unhelpful output such as:
`ERROR: blah blah blah (<stdin>:0 in ())`
Fix the stack-level and context output. Add a helper-script
and new unit-test to confirm it does not break again in the future.
Signed-off-by: Chris Evich <cevich@redhat.com>
One internal, and several external users of this library don't bother
sourcing individual `common/lib/*.sh` files. Instead they iterate
over all of them by name, which is messy and inconvenient. Add a
short-cut script which callers can source to load all common libraries.
Signed-off-by: Chris Evich <cevich@redhat.com>
Some users of the common library are not operating under a github
actions environment. To support installation under a github actions
environment while retaining that characteristic, new installer behavior
is required to allow subdirectory installers to modify the environment
file before "installation finished" (version file) is put in place.
Add a github action common lib installer which adds it's installation
directory into the system-wide environment file.
Update cirrus-ci_retrospective to utilize the new github action common
lib for some operations.
Update unit-tests.
Fix bug installing system-wide environment in Ubuntu vs Fedora
Signed-off-by: Chris Evich <cevich@redhat.com>
In order to better re-use common Github Action-specific helper script
libraries, move them into a more promintnt location, and add a README.md
Signed-off-by: Chris Evich <cevich@redhat.com>