Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #83 from ashish-amarnath/verify-all-find-error
Browse files Browse the repository at this point in the history
Log errors on verify failure
  • Loading branch information
k8s-ci-robot authored Jul 15, 2019
2 parents a477868 + 23dbca2 commit e3a34f1
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions hack/verify-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,46 @@ set -o pipefail
source "$(dirname "$0")/utils.sh"

# set REPO_PATH
REPO_PATH=$(get_root_path)
readonly REPO_PATH=$(get_root_path)
cd "${REPO_PATH}"

failure() {
if [[ "${1}" != 0 ]]; then
res=1
echo "${2} failed"
fi
}

# exit code, if a script fails we'll set this to 1
res=0

# run all verify scripts, optionally skipping any of them

if [[ "${VERIFY_WHITESPACE:-true}" == "true" ]]; then
echo "[*] Verifying whitespace..."
hack/verify-whitespace.sh || res=1
hack/verify-whitespace.sh
failure $? "verify-whitespace.sh"
cd "${REPO_PATH}"
fi

if [[ "${VERIFY_SPELLING:-true}" == "true" ]]; then
echo "[*] Verifying spelling..."
hack/verify-spelling.sh || res=1
hack/verify-spelling.sh
failure $? "verify-spelling.sh"
cd "${REPO_PATH}"
fi

if [[ "${VERIFY_BOILERPLATE:-true}" == "true" ]]; then
echo "[*] Verifying boilerplate..."
hack/verify-boilerplate.sh || res=1
hack/verify-boilerplate.sh
failure $? "verify-boilerplate.sh"
cd "${REPO_PATH}"
fi

if [[ "${VERIFY_GOFMT:-true}" == "true" ]]; then
echo "[*] Verifying gofmt..."
hack/verify-gofmt.sh || res=1
hack/verify-gofmt.sh
failure $? "verify-gofmt.sh"
cd "${REPO_PATH}"
fi

Expand All @@ -61,7 +72,8 @@ fi

if [[ "${VERIFY_GOLINT:-true}" == "true" ]]; then
echo "[*] Verifying golint..."
hack/verify-golint.sh || res=1
hack/verify-golint.sh
failure $? "verify-golint.sh"
cd "${REPO_PATH}"
fi

Expand All @@ -73,25 +85,29 @@ fi

if [[ "${VERIFY_DEPS:-true}" == "true" ]]; then
echo "[*] Verifying deps..."
hack/verify-deps.sh || res=1
hack/verify-deps.sh
failure $? "verify-deps.sh"
cd "${REPO_PATH}"
fi

if [[ "${VERIFY_GOTEST:-true}" == "true" ]]; then
echo "[*] Verifying gotest..."
hack/verify-gotest.sh || res=1
hack/verify-gotest.sh
failure $? "verify-gotest.sh"
cd "${REPO_PATH}"
fi

if [[ "${VERIFY_BUILD:-true}" == "true" ]]; then
echo "[*] Verifying build..."
hack/verify-build.sh || res=1
hack/verify-build.sh
failure $? "verify-build.sh"
cd "${REPO_PATH}"
fi

if [[ "${VERIFY_DOCKER_BUILD:-true}" == "true" ]]; then
echo "[*] Verifying capd-manager docker image build..."
hack/verify-docker-build.sh || res=1
hack/verify-docker-build.sh
failure $? "verify-docker-build.sh"
cd "${REPO_PATH}"
fi

Expand Down

0 comments on commit e3a34f1

Please sign in to comment.