Skip to content

Commit

Permalink
Merge pull request kubernetes#127754 from skitt/followup-module-verify
Browse files Browse the repository at this point in the history
hack verify.sh: clean up "base"
  • Loading branch information
k8s-ci-robot authored Oct 13, 2024
2 parents 426aa3d + be0cd19 commit 1bda3ef
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions hack/make-rules/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function run-checks {
else
echo -e "${color_red}FAILED${color_norm} ${check_name}\t${elapsed}s"
ret=1
FAILED_TESTS+=("${base}/${t}")
FAILED_TESTS+=("${PWD}/${t}")
fi
done
}
Expand Down Expand Up @@ -229,15 +229,18 @@ if ${QUICK} ; then
echo "Running in quick mode (QUICK=true). Only fast checks will run."
fi

shopt -s globstar
export API_KNOWN_VIOLATIONS_DIR="${KUBE_ROOT}"/api/api-rules
ret=0
modules=() # Pacify shellcheck
kube::util::read-array modules < <(go list -f '{{.Dir}}' -m)
for module in "${modules[@]}"; do
base=${module%/go.mod}
if [ -d "$base/hack" ]; then
kube::util::run-in "$base" run-checks "hack/verify-*.sh" bash
kube::util::run-in "$base" run-checks "hack/verify-*.py" python3
# Modules are discovered by looking for go.mod rather than asking go
# to ensure that modules that aren't part of the workspace and/or are
# not dependencies are checked too.
# . and staging are listed explicitly here to avoid _output
for module in ./go.mod ./staging/**/go.mod; do
module="${module%/go.mod}"
if [ -d "$module/hack" ]; then
kube::util::run-in "$module" run-checks "hack/verify-*.sh" bash
kube::util::run-in "$module" run-checks "hack/verify-*.py" python3
fi
done
missing-target-checks
Expand Down

0 comments on commit 1bda3ef

Please sign in to comment.