Browse Source

CI: check if necessary environment variables are set

emacs-27
Leonid Plyushch 6 years ago
parent
commit
07a554fd43
No known key found for this signature in database GPG Key ID: 45F2964132545795
  1. 12
      scripts/build/ci/cirrus-ci_dispatcher.sh

12
scripts/build/ci/cirrus-ci_dispatcher.sh

@ -32,6 +32,18 @@ fi
set +e
# Some environment variables are important for correct functionality
# of this script.
if [ -z "$CIRRUS_CHANGE_IN_REPO" ]; then
echo "[!] CIRRUS_CHANGE_IN_REPO is not set."
exit 1
fi
if [ -n "$CIRRUS_PR" ] && [ -z "${CIRRUS_BASE_SHA}" ]; then
echo "[!] CIRRUS_BASE_SHA is not set."
exit 1
fi
# Process tag '%ci:no-build' that may be added as line to commit message.
# Will force CI to exit with status 'passed' without performing build.
if grep -qiP '^\s*%ci:no-build\s*$' <(git log --format="%B" -n 1 "$CIRRUS_CHANGE_IN_REPO"); then

Loading…
Cancel
Save