18870: Flexible branch naming
authorPeter Amstutz <peter.amstutz@curii.com>
Sun, 26 Jun 2022 23:43:26 +0000 (19:43 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Tue, 28 Jun 2022 18:20:35 +0000 (14:20 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

tools/salt-install/installer.sh

index 37f1baf20ea5e48e1a21125848bd55620c77abd0..b901651e7c7272633d4a50bf22b056aa8b815058 100755 (executable)
@@ -66,6 +66,8 @@ case "$subcmd" in
 
        set -x
 
+       BRANCH=$(git branch --show-current)
+
        git add -A
        if ! git diff --cached --exit-code ; then
            git commit -m"prepare for deploy"
@@ -80,11 +82,12 @@ case "$subcmd" in
                    if ! git remote add $NODE $DEPLOY_USER@$NODE:arvados-setup.git ; then
                        git remote set-url $NODE $DEPLOY_USER@$NODE:arvados-setup.git
                    fi
-                   git push $NODE master
+                   git push $NODE $BRANCH
                    ssh $NODE git clone arvados-setup.git arvados-setup
                fi
 
-               git push $NODE master
+               git push $NODE $BRANCH
+               ssh $NODE git -C arvados-setup checkout $BRANCH
                ssh $NODE git -C arvados-setup pull
 
                ssh $DEPLOY_USER@$NODE "cd arvados-setup && sudo ./provision.sh --config local.params --roles ${NODES[$NODE]}"