Shorten the release job exectuion time on travis
To avoid running into the global timeout on travis, only do necessary
steps to perform a release. Checking if `make generate` and `make`
changes any artifacts is not necessary. It is also not necessary to run
unit tests on the tag.
#!/bin/bash -e
-
+# when not on a release do extensive checks
+if [ -z "$TRAVIS_TAG" ]; then
make generate-verify
make bazel-build-verify
# The make bazel-test might take longer then the current timeout for a command in Travis-CI of 10 min, so adding a keep alive loop while it runs
-while sleep 9m; do echo "Long running job - keep alive"; done & LOOP_PID=$!
+ while sleep 9m; do echo "Long running job - keep alive"; done &
+ LOOP_PID=$!
if [[ $TRAVIS_REPO_SLUG == "kubevirt/kubevirt" && $TRAVIS_CPU_ARCH == "amd64" ]]; then
make goveralls
@@ -15,6 +17,10 @@ fi
kill $LOOP_PID
+else
+ make
+fi
+
make build-verify # verify that we set version on the packages built by go(goveralls depends on go-build target)
make apidocs
make client-python
@@ -23,4 +29,3 @@ make olm-verify
if [[ $TRAVIS_CPU_ARCH == "amd64" ]]; then
make prom-rules-verify
fi
-
