Skip to content

Commit 32a915e

Browse files
committed
experiment: fix print-job-image-summary.sh
It was double-counting certain image names like "bazel" that appear across multiple registry prefixes. Address by displaying the full path to the image (minus gcr.io) for images where we're not sure which org the project (e.g. gcr.io/project-foo/image) belongs to
1 parent f78857b commit 32a915e

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

experiment/print-job-image-summary.sh

+15-15
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,26 @@ function image_include_exclude() {
4545

4646
cat <<EOS
4747
# images used by prowjobs on prow.k8s.io
48-
- total / $(image_include_exclude "" "^$")
49-
- gcr.io / $(image_include_exclude "gcr\.io" "^$")
48+
- total / $(image_include_exclude "" "^$")
49+
- gcr.io / $(image_include_exclude "gcr\.io" "^$")
5050
- kubernetes.io gcp org
51-
- k8s-staging-test-infra $(image_include_exclude "gcr\.io/k8s-staging-test-infra" "^$")
51+
- k8s-staging-test-infra $(image_include_exclude "gcr\.io/k8s-staging-test-infra" "^$")
5252
$(for i in $(image_include_exclude "gcr\.io/k8s-staging-test-infra" "^$" true | tail -n+2 | xargs -n1 basename); do printf \
53-
" - %-20s %s\n" "${i}" "$(image_include_exclude "gcr\.io/k8s-staging-test-infra/${i}" "^$")"; \
53+
" - %-43s %s\n" "${i}" "$(image_include_exclude "gcr\.io/k8s-staging-test-infra/${i}" "^$")"; \
5454
done | sort -k3 -rg)
55-
- k8s-staging-the_rest $(image_include_exclude "gcr\.io/k8s-staging" "test-infra")
56-
- k8s.gcr.io $(image_include_exclude "k8s\.gcr\.io" "^$")
55+
- k8s-staging-the_rest $(image_include_exclude "gcr\.io/k8s-staging" "test-infra")
56+
- k8s.gcr.io $(image_include_exclude "k8s\.gcr\.io" "^$")
5757
- google.com gcp org
58-
- k8s-prow $(image_include_exclude "gcr\.io/k8s-prow" "^$")
59-
- k8s-testimages $(image_include_exclude "gcr\.io/k8s-testimages" "^$")
58+
- k8s-prow $(image_include_exclude "gcr\.io/k8s-prow" "^$")
59+
- k8s-testimages $(image_include_exclude "gcr\.io/k8s-testimages" "^$")
6060
$(for i in $(image_include_exclude "gcr\.io/k8s-testimages" "^$" true | tail -n+2 | xargs -n1 basename); do printf \
61-
" - %-20s %s\n" "${i}" "$(image_include_exclude "gcr\.io/k8s-testimages/${i}" "^$")"; \
61+
" - %-43s %s\n" "${i}" "$(image_include_exclude "gcr\.io/k8s-testimages/${i}" "^$")"; \
6262
done | sort -k3 -rg)
63-
- other (unsure which org) $(image_include_exclude "gcr\.io" "^k8s.|k8s-(staging|prow|testimages)")
64-
$(for i in $(image_include_exclude "gcr\.io" "^k8s.|k8s-(staging|prow|testimages)" true | tail -n+2 | xargs -n1 basename); do printf \
65-
" - %-22s %s\n" "${i}" "$(image_include_exclude "gcr\.io/.*/${i}$" "^$")"; \
63+
- other (unsure which org) $(image_include_exclude "gcr\.io" "^k8s.|k8s-(staging|prow|testimages)")
64+
$(for i in $(image_include_exclude "gcr\.io" "^k8s.|k8s-(staging|prow|testimages)" true | tail -n+2 | cut -d/ -f2- ); do printf \
65+
" - %-45s %s\n" "${i}" "$(image_include_exclude "gcr\.io/${i}$" "^$")"; \
6666
done | sort -k3 -rg)
67-
- not gcr.io / $(image_include_exclude "" "gcr\.io")
68-
- dockerhub / $(image_include_exclude "^[^\.]+$|^[^/]+$|docker\.io" "gcr\.io")
69-
- quay.io / $(image_include_exclude "quay\.io" "gcr\.io")
67+
- not gcr.io / $(image_include_exclude "" "gcr\.io")
68+
- dockerhub / $(image_include_exclude "^[^\.]+$|^[^/]+$|docker\.io" "gcr\.io")
69+
- quay.io / $(image_include_exclude "quay\.io" "gcr\.io")
7070
EOS

0 commit comments

Comments
 (0)