Always exit 0 on tag for tests

pull/1330/head
Erik Wilson 2020-01-21 11:07:12 -07:00
parent 4ec28d2707
commit 5117ea0ca7
3 changed files with 9 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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