Skip to content

Commit

Permalink
Only test ContainerExecDecoratorTest to focus on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlatombe committed Jan 17, 2020
1 parent 7a79a9b commit e02e213
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ parallel kind: {
node('docker') {
timeout(60) {
checkout scm
withEnv(["WSTMP=${pwd tmp: true}"]) {
withEnv(["WSTMP=${pwd tmp: true}","TEST=ContainerExecDecoratorTest"]) {
try {
sh 'bash kind.sh'
dir (WSTMP) {
Expand Down
8 changes: 6 additions & 2 deletions kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,25 @@ then
fi
if [ \! -f $WSTMP/kubectl ]
then
curl -Lo $WSTMP/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.15.3/bin/linux/amd64/kubectl
curl -Lo $WSTMP/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.17.0/bin/$(uname | tr '[:upper:]' '[:lower:]')/amd64/kubectl
chmod +x $WSTMP/kubectl
fi

# TODO use kind load to take better advantage of images cached in the host VM
export cluster=ci$RANDOM
export KUBECONFIG=$WSTMP/kubeconfig-$cluster
kind create cluster --name $cluster --wait 5m
function cleanup() {
kind export logs --name $cluster $WSTMP/kindlogs || :
kind delete cluster --name $cluster || :
rm $KUBECONFIG
}
trap cleanup EXIT
kubectl cluster-info

DOCKER_IMAGE=$(grep -e image: test-in-k8s.yaml | cut -d ':' -f 2- | xargs)
docker pull $DOCKER_IMAGE
kind load docker-image $DOCKER_IMAGE --name $cluster

bash test-in-k8s.sh
rm -rf $WSTMP/surefire-reports
kubectl cp jenkins:/checkout/target/surefire-reports $WSTMP/surefire-reports

0 comments on commit e02e213

Please sign in to comment.