Browse Source

Merge pull request #1330 from erikwilson/sonobuoy-conformance-version

Cleanup sonobuoy
pull/1335/head v1.17.1-alpha1+k3s1
Erik Wilson 5 years ago committed by GitHub
parent
commit
129317db7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      Dockerfile.test.dapper
  2. 4
      scripts/test
  3. 16
      scripts/test-helpers

4
Dockerfile.test.dapper

@ -6,7 +6,7 @@ ARG DAPPER_HOST_ARCH
ENV ARCH $DAPPER_HOST_ARCH
RUN if [ "${ARCH}" == "amd64" ] || [ "${ARCH}" == "arm64" ]; then \
VERSION=0.17.0 OS=linux && \
VERSION=0.17.1 OS=linux && \
curl -sL "https://github.com/vmware-tanzu/sonobuoy/releases/download/v${VERSION}/sonobuoy_${VERSION}_${OS}_${ARCH}.tar.gz" | \
tar -xzf - -C /usr/local/bin; \
fi
@ -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

4
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

16
scripts/test-helpers

@ -189,8 +189,15 @@ sonobuoy-test() {
return 0
fi
echo 'Starting sonobuoy tests'
local VERSION_CONFORMANCE=$(sed -e 's/[-+].*$//g' <<< "$VERSION_K8S")
sonobuoy run \
--config=scripts/sonobuoy-config.json \
--plugin-env=e2e.E2E_USE_GO_RUNNER=true \
--kube-conformance-image-version=${VERSION_CONFORMANCE} \
--wait=30 \
$@ &
sonobuoy run --config=scripts/sonobuoy-config.json --plugin-env=e2e.E2E_USE_GO_RUNNER=true --wait=30 $@ &
local sonobuoyPID=$!
local code=0
time wait $sonobuoyPID || code=$?
@ -510,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
}
@ -524,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

Loading…
Cancel
Save