From bec10e49f66031c3829ccf75e6f21d3656554c45 Mon Sep 17 00:00:00 2001 From: Melissa Lee <43827333+halim-lee@users.noreply.github.com> Date: Wed, 12 Jan 2022 09:09:18 -0800 Subject: [PATCH] Travis pipeline edit for minikube testing (#316) * Travis pipeline edit for minikube testing * Exit minikube script at test failure Co-authored-by: halim-lee --- .travis.yml | 12 ++++++------ scripts/e2e-minikube.sh | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index c3eff4d34..f059b6b44 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ stages: # Builds are split into 'e2e-test' and 'build' to allow e2e tests to run first. If e2e fails, don't bother # building and pushing the images for the other architectures. - name: minikube-e2e-test - if: (branch = main OR tag =~ ^v) AND fork = false AND type != cron + if: (branch = main OR tag =~ ^v) AND fork = false AND type != pull_request AND type != cron - name: e2e-test if: (branch = main OR tag =~ ^v) AND fork = false AND type != cron - name: build @@ -36,11 +36,6 @@ jobs: - name: Unit testing stage: unit-test script: make unit-test - - name: Minikube test on amd64 - stage: minikube-e2e-test - os: linux - arch: amd64 - script: travis_wait 45 make setup minikube-test-e2e || travis_terminate 1 - name: Build image on amd64 and test stage: e2e-test os: linux @@ -70,6 +65,11 @@ jobs: - name: Verify manifest lists stage: build-manifest script: make build-manifest + - name: Minikube test on amd64 + stage: minikube-e2e-test + os: linux + arch: amd64 + script: travis_wait 45 make setup minikube-test-e2e || travis_terminate 1 # Build all non-ignored releases - name: Build image on amd64 and test stage: rebuild-e2e-test diff --git a/scripts/e2e-minikube.sh b/scripts/e2e-minikube.sh index ef0cd8d76..b0355c239 100755 --- a/scripts/e2e-minikube.sh +++ b/scripts/e2e-minikube.sh @@ -105,6 +105,7 @@ main() { echo "****** Starting minikube scorecard tests..." operator-sdk scorecard --verbose --selector=suite=kuttlsuite --namespace "${TEST_NAMESPACE}" --service-account scorecard-kuttl --wait-time 30m ./bundle || { echo "****** Scorecard tests failed..." + exit 1 } result=$?