mirror of https://github.com/k3s-io/k3s
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 ```pull/6/head
commit
aa12b9b7cb
|
@ -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 "$@"
|
||||
|
|
Loading…
Reference in New Issue