From: Zack Cerza Date: Mon, 21 Mar 2022 16:47:12 +0000 (-0600) Subject: start.sh: Use current branch by default X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=97630f0867b8311f81862cc4ee28df677374363c;p=teuthology.git start.sh: Use current branch by default Since the main use-case for this work at the moment is self-testing teuthology, let's make it easy to test the same branch that's being worked on. Signed-off-by: Zack Cerza --- diff --git a/docs/docker-compose/start.sh b/docs/docker-compose/start.sh index bb50dad719..9c71889af5 100755 --- a/docs/docker-compose/start.sh +++ b/docs/docker-compose/start.sh @@ -1,6 +1,12 @@ #!/bin/bash -# Clone teuthology -git clone https://github.com/ceph/teuthology.git +set -e +if [ -z "$TEUTHOLOGY_BRANCH" -a -n "$GITHUB_HEAD_REF" ]; then + TEUTHOLOGY_BRANCH=${GITHUB_HEAD_REF} +fi +git clone \ + --depth 1 \ + -b ${TEUTHOLOGY_BRANCH:-$(git branch --show-current)} \ + https://github.com/ceph/teuthology.git # Check for .teuthology.yaml file and copy it to teuthology if [ -f ".teuthology.yaml" ];