Helper functions that are shared and used by other modules
The module ID is common
All functions exposed by this module will use the namespaced prefix:
cicd::common::
Use the common
id to load the module
CICD_TOOLS_URL="https://raw.githubusercontent.com/RedHatInsights/cicd-tools/main/src/bootstrap.sh"
# shellcheck source=/dev/null
source <(curl -sSL "$CICD_TOOLS_URL") common
This module requires one of the supported container engines to be present in the session's PATH
.
The currently supported container engines are:
docker
podman
returns 0 (true) if the command passed as a parameter is found in the session's PATH
Returns the first 7 characters from the latest commit of current directory's git HEAD
Returns 0 (true) if the current context is considered a CI context (i.e - running in a job on a CI system)