From 6760bf1462d1686ee97d08a626cc0892cea588bf Mon Sep 17 00:00:00 2001 From: Brett Holman Date: Wed, 8 Dec 2021 17:31:33 -0700 Subject: travis - don't run integration tests if no deb (#1139) If building the *.deb fails, exit Currently integration tests will run and fail with a non-obvious message. This makes it so the last thing in the logs is whatever caused the build to fail. --- .travis.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to '.travis.yml') diff --git a/.travis.yml b/.travis.yml index 1582e829..9470cc31 100644 --- a/.travis.yml +++ b/.travis.yml @@ -119,9 +119,11 @@ matrix: sudo tar --sparse --xattrs --xattrs-include=* -cf "$TRAVIS_BUILD_DIR/chroots/xenial-amd64.tar" -C /var/lib/schroot/chroots/xenial-amd64 . fi # Use sudo to get a new shell where we're in the sbuild group - - sudo -E su $USER -c 'sbuild --nolog --no-run-lintian --verbose --dist=xenial cloud-init_*.dsc' - - ssh-keygen -P "" -q -f ~/.ssh/id_rsa - - sg lxd -c 'CLOUD_INIT_CLOUD_INIT_SOURCE="$(ls *.deb)" tox -e integration-tests-ci' + # Don't run integration tests when build fails + - | + sudo -E su $USER -c 'sbuild --nolog --no-run-lintian --verbose --dist=xenial cloud-init_*.dsc' && + ssh-keygen -P "" -q -f ~/.ssh/id_rsa && + sg lxd -c 'CLOUD_INIT_CLOUD_INIT_SOURCE="$(ls *.deb)" tox -e integration-tests-ci' - python: 3.5 env: TOXENV=xenial -- cgit v1.2.3