From 781d6ecaa75e58d0e0d9cf4193350f6be5c6422e Mon Sep 17 00:00:00 2001 From: Salvador Fuentes Date: Tue, 29 Sep 2020 08:56:11 -0400 Subject: [PATCH] ci: fix clone_tests_repo function We should not checkout to 2.0-dev branch in the clone_tests_repo function when running in Jenkins CI as it discards changes from tests repo. Fixes: #818. Signed-off-by: Salvador Fuentes --- ci/lib.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ci/lib.sh b/ci/lib.sh index f9a94bdd9f..64fce57f95 100644 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -5,13 +5,11 @@ export tests_repo="${tests_repo:-github.com/kata-containers/tests}" export tests_repo_dir="$GOPATH/src/$tests_repo" -export branch="2.0-dev" +export branch="${branch:-2.0-dev}" clone_tests_repo() { - # KATA_CI_NO_NETWORK is (has to be) ignored if there is - # no existing clone. - if [ -d "$tests_repo_dir" -a -n "$KATA_CI_NO_NETWORK" ] + if [ -d "$tests_repo_dir" -a -n "$CI" ] then return fi