From 52615d4bb26558db7d6f5abcac20aebac465a99c Mon Sep 17 00:00:00 2001 From: Richard Liu <39319471+richardsliu@users.noreply.github.com> Date: Thu, 1 Aug 2019 18:03:52 -0700 Subject: [PATCH] Fix periodic tests checkout script (#430) --- images/checkout.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/images/checkout.sh b/images/checkout.sh index 00ec2c22d27..310df80a110 100644 --- a/images/checkout.sh +++ b/images/checkout.sh @@ -26,7 +26,9 @@ mkdir -p /src/${REPO_OWNER} # TODO(jlewi): We should eventually move the code for running the workflow from # kubeflow/kubeflow into kubeflow/testing # We need depth=2 so that we can compare commit with previous commit in postsubmit runs. -git clone --depth=2 https://github.com/${REPO_OWNER}/${REPO_NAME}.git ${SRC_DIR}/${REPO_OWNER}/${REPO_NAME} +# We also need --no-single-branch because otherwise Git assumes there is only one branch, +# which causes periodic tests against non-master branches to fail. +git clone --depth=2 --no-single-branch https://github.com/${REPO_OWNER}/${REPO_NAME}.git ${SRC_DIR}/${REPO_OWNER}/${REPO_NAME} echo Job Name = ${JOB_NAME}