From 9f3113e1f669f2d4dcef29cdccdfb362c69381c6 Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Sun, 27 Sep 2020 17:26:56 +0800 Subject: [PATCH] ci: always checkout 2.0-dev of test repository We use 2.0-dev in the tests repository now. Always make sure we use the right branch. Signed-off-by: Peng Tao --- ci/lib.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ci/lib.sh b/ci/lib.sh index 3aa9c5c30e..f9a94bdd9f 100644 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -5,6 +5,7 @@ export tests_repo="${tests_repo:-github.com/kata-containers/tests}" export tests_repo_dir="$GOPATH/src/$tests_repo" +export branch="2.0-dev" clone_tests_repo() { @@ -17,14 +18,15 @@ clone_tests_repo() go get -d -u "$tests_repo" || true - if [ -n "${TRAVIS_BRANCH:-}" ]; then - ( cd "${tests_repo_dir}" && git checkout "${TRAVIS_BRANCH}" ) - fi + pushd "${tests_repo_dir}" && git checkout "${branch}" && popd } run_static_checks() { clone_tests_repo + # Make sure we have the targeting branch + git remote set-branches --add origin "${branch}" + git fetch -a bash "$tests_repo_dir/.ci/static-checks.sh" "github.com/kata-containers/kata-containers" }