Skip to content

Instantly share code, notes, and snippets.

@nikhita
Forked from sttts/test-staging.sh
Last active Jun 28, 2018
Embed
What would you like to do?
#!/bin/bash -ex
rm -rf cache.new
if [ ! -d cache ]; then
mkdir cache.new
pushd cache.new
for repo in $(ls -1 ../kubernetes/staging/src/k8s.io); do
git clone git@github.com:kubernetes/${repo}.git
done
popd
mv cache.new cache
fi
for repo in $(ls -1 kubernetes/staging/src/k8s.io); do
rm -rf ${repo}
git clone --reference ./cache/${repo} git@github.com:kubernetes/${repo}.git
done
function kubeDeps() {
jq -r ".Deps | map(.ImportPath) | .[]" Godeps/Godeps.json | grep "^k8s.io/" | cut -d/ -f2 | sort -u
}
function rmVendorsInKubeDeps() {
for dep in $(kubeDeps); do
pushd ../${dep} >/dev/null
git rm -q -rf vendor/ && git commit -m "rm vendor/" -q || true
popd
done
}
for branch in v8.0.0; do # v7.0.0 release-1.7; do
pushd client-go
git checkout ${branch}
godep restore
go build ./...
git reset --hard
git clean -f -f -d
popd
done
for branch in master release-1.8 release-1.9 release-1.10 release-1.11; do #release-1.7; do
pushd sample-apiserver
git checkout ${branch}
go build .
git reset --hard
git clean -f -f -d
popd
done
for branch in master release-1.8 release-1.9 release-1.10 release-1.11; do #release-1.7; do
pushd sample-apiserver
git checkout ${branch}
godep restore
rm -rf vendor/ Godeps/
godep save ./...
go build .
git reset --hard
git clean -f -f -d
popd
done
for branch in master release-1.9 release-1.10 release-1.11; do
pushd sample-controller
git checkout ${branch}
go build .
git reset --hard
git clean -f -f -d
popd
done
for branch in master release-1.9 release-1.10 release-1.11; do
pushd sample-controller
git checkout ${branch}
godep restore
rm -rf vendor/
godep save ./...
go build .
git reset --hard
git clean -f -f -d
popd
done
for branch in master release-1.8 release-1.9 release-1.10 release 1.11 v8.0.0; do # v7.0.0; do
pushd $GOPATH/src/github.com/sttts/kube-glide-test
git checkout ${branch}
rm -rf glide.lock vendor/
glide install --strip-vendor
go build .
git reset --hard
git clean -f -f -d
popd
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment