Unverified Commit aa12b9b7 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #58849 from cblecker/staging-speed

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Only run verify-staging-godeps if staging/godeps are touched **What this PR does / why we need it**: I had a lightbulb moment. On presubmit, we only verify godeps if one of the following is changed: - The godep scripts - The Godeps/ dir - The vendor/ dir The same should apply to verifying the staging godeps, adding in the staging dir itself. The logic being, if we don't touch Godeps/vendor, we don't touch the script that generates stuff, and we don't make changes to the staging dir itself (like adding/removing imports), then we don't need to verify godeps. Note that post-submit CI jobs will still check these, as I'm copying the same logic that's in verify-godeps This seems too easy, so *please* point out if I'm missing something. **Release note**: ```release-note NONE ```
parents 4ce4bdc8 0088f3d6
......@@ -25,6 +25,7 @@ readonly branch=${1:-${KUBE_VERIFY_GIT_BRANCH:-master}}
if ! [[ ${KUBE_FORCE_VERIFY_CHECKS:-} =~ ^[yY]$ ]] && \
! kube::util::has_changes_against_upstream_branch "${branch}" 'Godeps/' && \
! kube::util::has_changes_against_upstream_branch "${branch}" 'vendor/' && \
! kube::util::has_changes_against_upstream_branch "${branch}" 'hack/lib/' && \
! kube::util::has_changes_against_upstream_branch "${branch}" 'hack/.*godep'; then
exit 0
fi
......
......@@ -19,4 +19,17 @@ set -o nounset
set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
source "${KUBE_ROOT}/hack/lib/init.sh"
readonly branch=${1:-${KUBE_VERIFY_GIT_BRANCH:-master}}
if ! [[ ${KUBE_FORCE_VERIFY_CHECKS:-} =~ ^[yY]$ ]] && \
! kube::util::has_changes_against_upstream_branch "${branch}" 'staging/' && \
! kube::util::has_changes_against_upstream_branch "${branch}" 'build/' && \
! kube::util::has_changes_against_upstream_branch "${branch}" 'Godeps/' && \
! kube::util::has_changes_against_upstream_branch "${branch}" 'vendor/' && \
! kube::util::has_changes_against_upstream_branch "${branch}" 'hack/lib/' && \
! kube::util::has_changes_against_upstream_branch "${branch}" 'hack/.*godep'; then
exit 0
fi
KUBE_VERBOSE="${KUBE_VERBOSE:-3}" KUBE_RUN_COPY_OUTPUT=N ${KUBE_ROOT}/hack/update-staging-godeps.sh -d -f "$@"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment