Skip to content

Commit

Permalink
Merge pull request #1771 from nikhita/verify-script-follow-ups
Browse files Browse the repository at this point in the history
hack: clean up verify scripts
  • Loading branch information
k8s-ci-robot authored Mar 9, 2021
2 parents 39e4dd0 + ac18c8a commit c3b4923
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions hack/verify-yamllint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ if [ $# != 0 ]; then
exit 1
fi

# we assume that pip3 is already installed
if ! command -v yamllint >/dev/null 2>&1; then
echo "yamllint not found - installing with: ${pip} install -r ${pip_requirements}"
${pip} install -r ${pip_requirements}
Expand Down
6 changes: 3 additions & 3 deletions hack/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set -o errexit
set -o nounset
set -o pipefail

KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/..

# Some useful colors.
if [[ -z "${color_start-}" ]]; then
Expand All @@ -35,7 +35,7 @@ EXCLUDED_PATTERNS=(
"verify-terraform.sh" # Expect a cluster as an argument
)

EXCLUDED_CHECKS=$(ls ${EXCLUDED_PATTERNS[@]/#/${KUBE_ROOT}\/hack\/} 2>/dev/null || true)
EXCLUDED_CHECKS=$(ls ${EXCLUDED_PATTERNS[@]/#/${REPO_ROOT}\/hack\/} 2>/dev/null || true)

function is-excluded {
for e in ${EXCLUDED_CHECKS[@]}; do
Expand Down Expand Up @@ -111,7 +111,7 @@ if ${SILENT} ; then
fi

ret=0
run-checks "${KUBE_ROOT}/hack/verify-*.sh" bash
run-checks "${REPO_ROOT}/hack/verify-*.sh" bash

if [[ ${ret} -eq 1 ]]; then
print-failed-tests
Expand Down

0 comments on commit c3b4923

Please sign in to comment.