hack: add verify script for boilerplate and yamllint check#1765
hack: add verify script for boilerplate and yamllint check#1765k8s-ci-robot merged 2 commits intokubernetes:mainfrom
Conversation
- Update existing `verify-yamllint.sh` script to install yamllint if it does not exist. - Add `verify-boilerplate.sh` script for verifying boilerplate. - Add `verify.sh` script to test all verify scripts at once. This would be useful for adding future verify scripts.
|
/cc @ameukam |
| echo >/dev/stderr "ERROR: yamllint not found - please install with: ${pip} install -r ${pip_requirements}" | ||
| exit 1 | ||
| echo "yamllint not found - installing with: ${pip} install -r ${pip_requirements}" | ||
| ${pip} install -r ${pip_requirements} |
There was a problem hiding this comment.
It would be great to have a comment saying we assume pip3 is already installed.
There was a problem hiding this comment.
Fair point, I think we can address in followup. Other scripts in this repo assume the presence of python3, which implies pip3. Not sure if they verify their assumptions either
| set -o nounset | ||
| set -o pipefail | ||
|
|
||
| KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. |
There was a problem hiding this comment.
Nit for followup: I think I would rather use REPO_ROOT or something not so tied to k/k script conventions. Repo root is what I saw in some test-infra scripts.
I don't feel strongly about this but it would be good to standardize across the scripts we have in this repo. This should at least use BASH_SOURCE[0] as a followup
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nikhita, spiffxp The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Ref: "ideas of follow up" in kubernetes/test-infra#20956
This PR:
Updates existing
verify-yamllint.shscript to install yamllint ifit does not exist.
Adds
verify-boilerplate.shscript for verifying boilerplate.This is derived from the script in the enhancements repo.
Adds
verify.shscript to test all verify scripts at once. This wouldbe useful for adding future verify scripts.
Fixes boilerplate headers to make the script pass
/assign @spiffxp