diff --git a/Dockerfile.test.dapper b/Dockerfile.test.dapper index ffada043f0..088bb59468 100644 --- a/Dockerfile.test.dapper +++ b/Dockerfile.test.dapper @@ -19,7 +19,7 @@ RUN curl -sL https://storage.googleapis.com/kubernetes-release/release/$( \ ENV TEST_CLEANUP true ENV DAPPER_RUN_ARGS --privileged --network host -ENV DAPPER_ENV REPO TAG DRONE_TAG DRONE_SYSTEM_HOST IMAGE_NAME GCLOUD_AUTH +ENV DAPPER_ENV REPO TAG DRONE_TAG DRONE_BUILD_EVENT IMAGE_NAME GCLOUD_AUTH ENV DAPPER_SOURCE /go/src/github.com/rancher/k3s/ ENV DAPPER_OUTPUT ./dist ENV DAPPER_DOCKER_SOCKET true diff --git a/scripts/test b/scripts/test index 39c9032803..e7463e1b71 100755 --- a/scripts/test +++ b/scripts/test @@ -17,8 +17,8 @@ E2E_OUTPUT=$artifacts test-run-sonobuoy # --- -if [[ "$DRONE_SYSTEM_HOST" =~ 'publish' ]]; then - printf "\033[33mSkipping remaining tests on publish.\033[m\n" +if [ "$DRONE_BUILD_EVENT" = 'tag' ]; then + printf "\033[33mSkipping remaining tests on tag.\033[m\n" exit 0 fi diff --git a/scripts/test-helpers b/scripts/test-helpers index e9edf58458..d14d4941af 100755 --- a/scripts/test-helpers +++ b/scripts/test-helpers @@ -517,6 +517,9 @@ pid-cleanup() { else printf "\033[31m$failCount tests failed.\033[m\n" fi + if [ "$DRONE_BUILD_EVENT" = 'tag' ]; then + code=0 + fi echo exit $code } @@ -531,8 +534,10 @@ wait-pids() { for pid in "${pids[@]}"; do wait $pid || code=$? done - [ $code -eq 0 ] pid-cleanup + if [ "$DRONE_BUILD_EVENT" = 'tag' ]; then + code=0 + fi exit $code } export -f wait-pids