Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added prow job for depstat #22137

Merged
merged 12 commits into from
May 14, 2021
28 changes: 28 additions & 0 deletions config/jobs/kubernetes/sig-arch/kubernetes-depstat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
presubmits:
kubernetes/kubernetes:
- name: kubernetes-depstat
decorate: true
always_run: true
skip_report: true
spec:
containers:
- image: golang
command: ["/bin/bash"]
args:
- -c
- |
set -euo \
BASE_SHA="${PULL_BASE_SHA:-""}" \
ARTIFACTS="${ARTIFACTS:-/tmp/artifacts}" \
mkdir -p "${ARTIFACTS}" \
cd "$ARTIFACTS" \
go install github.com/kubernetes-sigs/depstat@latest \
cd /go/src/k8s.io/kubernetes \
function write_report() { depstat stats --json; } \
function diff_reports() { diff "$1" "$2"; } \
write_report > "${ARTIFACTS}/stats.json" \
if [ -n "${BASE_SHA}" ]; then \
git checkout -b base "${BASE_SHA}" \
write_report > "${ARTIFACTS}/stats-base.json" \
diff_reports "${ARTIFACTS}"/stats-base.json "${ARTIFACTS}"/stats.json \
fi \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove \ at the end of the last line.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are other issues as well. here's how you test

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you may need to separate lines using ;