etcd-operator/hack/jenkins

42 строки
850 B
Bash
Executable File

#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
origpwd=$(pwd)
GOPATH="${origpwd}/../build-${BUILD_ID}/gopath/"
rm -rf $GOPATH
mkdir -p $GOPATH
cd $GOPATH
export GOPATH=`pwd`
echo "GOPATH: ${GOPATH}"
mkdir -p $GOPATH/src/github.com/coreos
ln -s "${origpwd}" $GOPATH/src/github.com/coreos/kube-etcd-controller
cd $GOPATH/src/github.com/coreos/kube-etcd-controller
cleanup() {
echo "cleaning up ==="
cd $origpwd
rm -rf "${origpwd}/../build-${BUILD_ID}"
}
trap cleanup EXIT
glide install
GIT_VERSION=$(git rev-parse HEAD)
export CONTROLLER_IMAGE="gcr.io/coreos-k8s-scale-testing/kube-etcd-controller:${GIT_VERSION}"
export TEST_NAMESPACE="e2e-test-${BUILD_ID}"
echo "controller image: ${CONTROLLER_IMAGE}"
echo "test namespace: ${TEST_NAMESPACE}"
if "hack/test"; then
echo "Success! ==="
else
echo "Fail! ==="
exit 1
fi