From 5987db8b5c7fb6547ab3ac9f29780913909b09ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Duraffort?= Date: Tue, 2 Oct 2018 17:13:55 +0200 Subject: CI: fail the job is listing deps is failing Thanks to shell syntax, we should split this in two lines in order to exit the script if listing the requirements fail for any reason. --- .gitlab-ci/analyze/coverage.sh | 12 ++++++++---- .gitlab-ci/test/dispatcher-debian-10.sh | 3 ++- .gitlab-ci/test/dispatcher-debian-9.sh | 6 ++++-- .gitlab-ci/test/server-debian-10.sh | 3 ++- .gitlab-ci/test/server-debian-9.sh | 6 ++++-- 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci/analyze/coverage.sh b/.gitlab-ci/analyze/coverage.sh index 046fa64f7..33cf38677 100755 --- a/.gitlab-ci/analyze/coverage.sh +++ b/.gitlab-ci/analyze/coverage.sh @@ -5,10 +5,14 @@ set -e if [ "$1" = "setup" ] then set -x - apt-get install --no-install-recommends --yes $(./share/requires.py -p lava-dispatcher -d debian -s stretch -n) - apt-get install --no-install-recommends --yes $(./share/requires.py -p lava-dispatcher -d debian -s stretch-backports -n) - apt-get install --no-install-recommends --yes $(./share/requires.py -p lava-server -d debian -s stretch -n) - apt-get install --no-install-recommends --yes $(./share/requires.py -p lava-server -d debian -s stretch-backports -n) + DEPS=$(./share/requires.py -p lava-dispatcher -d debian -s stretch -n) + apt-get install --no-install-recommends --yes $DEPS + DEPS=$(./share/requires.py -p lava-dispatcher -d debian -s stretch-backports -n) + apt-get install --no-install-recommends --yes $DEPS + DEPS=$(./share/requires.py -p lava-server -d debian -s stretch -n) + apt-get install --no-install-recommends --yes $DEPS + DEPS=$(./share/requires.py -p lava-server -d debian -s stretch-backports -n) + apt-get install --no-install-recommends --yes $DEPS else set -x PYTHONPATH=. py.test-3 --cache-clear -v --cov --cov-report= lava_dispatcher/test diff --git a/.gitlab-ci/test/dispatcher-debian-10.sh b/.gitlab-ci/test/dispatcher-debian-10.sh index f7b362dde..29a617c69 100755 --- a/.gitlab-ci/test/dispatcher-debian-10.sh +++ b/.gitlab-ci/test/dispatcher-debian-10.sh @@ -5,7 +5,8 @@ set -e if [ "$1" = "setup" ] then set -x - apt-get install --no-install-recommends --yes $(./share/requires.py -p lava-dispatcher -d debian -s buster -n) + DEPS=$(./share/requires.py -p lava-dispatcher -d debian -s buster -n) + apt-get install --no-install-recommends --yes $DEPS else set -x PYTHONPATH=. py.test-3 --cache-clear -v --junitxml=dispatcher.xml lava_dispatcher/test diff --git a/.gitlab-ci/test/dispatcher-debian-9.sh b/.gitlab-ci/test/dispatcher-debian-9.sh index 4289751e5..b7c08113e 100755 --- a/.gitlab-ci/test/dispatcher-debian-9.sh +++ b/.gitlab-ci/test/dispatcher-debian-9.sh @@ -5,8 +5,10 @@ set -e if [ "$1" = "setup" ] then set -x - apt-get install --no-install-recommends --yes $(./share/requires.py -p lava-dispatcher -d debian -s stretch -n) - apt-get install --no-install-recommends --yes -t stretch-backports $(./share/requires.py -p lava-dispatcher -d debian -s stretch-backports -n) + DEPS=$(./share/requires.py -p lava-dispatcher -d debian -s stretch -n) + apt-get install --no-install-recommends --yes $DEPS + DEPS=$(./share/requires.py -p lava-dispatcher -d debian -s stretch-backports -n) + apt-get install --no-install-recommends --yes -t stretch-backports $DEPS else set -x PYTHONPATH=. py.test-3 --cache-clear -v --junitxml=dispatcher.xml lava_dispatcher/test diff --git a/.gitlab-ci/test/server-debian-10.sh b/.gitlab-ci/test/server-debian-10.sh index 15a077ef9..c6d758e34 100755 --- a/.gitlab-ci/test/server-debian-10.sh +++ b/.gitlab-ci/test/server-debian-10.sh @@ -5,7 +5,8 @@ set -e if [ "$1" = "setup" ] then set -x - apt-get install --no-install-recommends --yes $(./share/requires.py -p lava-server -d debian -s buster -n) + DEPS=$(./share/requires.py -p lava-server -d debian -s buster -n) + apt-get install --no-install-recommends --yes $DEPS else set -x PYTHONPATH=. py.test-3 --cache-clear -v --junitxml=common.xml lava_common/test diff --git a/.gitlab-ci/test/server-debian-9.sh b/.gitlab-ci/test/server-debian-9.sh index 7fd4a0604..cb22eb3b7 100755 --- a/.gitlab-ci/test/server-debian-9.sh +++ b/.gitlab-ci/test/server-debian-9.sh @@ -5,8 +5,10 @@ set -e if [ "$1" = "setup" ] then set -x - apt-get install --no-install-recommends --yes $(./share/requires.py -p lava-server -d debian -s stretch -n) - apt-get install --no-install-recommends --yes -t stretch-backports $(./share/requires.py -p lava-server -d debian -s stretch-backports -n) + DEPS=$(./share/requires.py -p lava-server -d debian -s stretch -n) + apt-get install --no-install-recommends --yes $DEPS + DEPS=$(./share/requires.py -p lava-server -d debian -s stretch-backports -n) + apt-get install --no-install-recommends --yes -t stretch-backports $DEPS else set -x PYTHONPATH=. py.test-3 --cache-clear -v --junitxml=common.xml lava_common/test -- cgit v1.2.3