diff --git a/.github/workflows/deploy-wiab.yml b/.github/workflows/deploy-wiab.yml index c51d007d3..cbbc82c1f 100644 --- a/.github/workflows/deploy-wiab.yml +++ b/.github/workflows/deploy-wiab.yml @@ -1,4 +1,4 @@ -name: Deploy on Hetnzer WIAB setup +name: Deploy on Hetzner WIAB setup on: pull_request: branches: @@ -30,7 +30,7 @@ jobs: - name: Get latest commit SHA id: get_commit_sha run: | - COMMIT_SHA=$(git rev-parse --short HEAD) + COMMIT_SHA=$(git rev-parse HEAD) echo "commit_sha=$COMMIT_SHA" >> $GITHUB_ENV # Step 4: Run the autodeploy script diff --git a/bin/autodeploy.sh b/bin/autodeploy.sh index 41a2f34c1..baf188a87 100755 --- a/bin/autodeploy.sh +++ b/bin/autodeploy.sh @@ -101,7 +101,7 @@ for SUBDOMAIN in $SUBDOMAINS; do fi done -if ssh -v -o StrictHostKeyChecking=no -o ConnectTimeout=5 -p "$SSH_PORT" "$SSH_USER"@webapp."$TARGET_SYSTEM" id | grep -q "$SSH_USER"; then +if ssh -q -o StrictHostKeyChecking=no -o ConnectTimeout=5 -p "$SSH_PORT" "$SSH_USER"@webapp."$TARGET_SYSTEM" id | grep -q "$SSH_USER"; then msg "" msg "INFO: Successfully logged into $TARGET_SYSTEM as $SSH_USER" else @@ -120,7 +120,7 @@ system_cleanup_meta() { msg "INFO: Cleaning up all VMs, docker resources and wire-server-deploy files on $TARGET_SYSTEM." msg "" sleep 5 - ssh -p "$SSH_PORT" "$SSH_USER"@webapp."$TARGET_SYSTEM" "bash -s" </dev/null" || echo "false") -EXISTING_VMS=$(ssh -p "$SSH_PORT" "$SSH_USER"@webapp."$TARGET_SYSTEM" "virsh list --all --name" || echo "false") -EXISTING_CONTAINERS=$(ssh -p "$SSH_PORT" "$SSH_USER"@webapp."$TARGET_SYSTEM" "docker ps -q --all" || echo "false") +EXISTING_INSTALL=$(ssh -p "$SSH_PORT" -o StrictHostKeyChecking=no "$SSH_USER"@webapp."$TARGET_SYSTEM" "ls /home/$DEMO_USER/wire-server-deploy-static-*.tgz 2>/dev/null" || echo "false") +EXISTING_VMS=$(ssh -p "$SSH_PORT" -o StrictHostKeyChecking=no "$SSH_USER"@webapp."$TARGET_SYSTEM" "virsh list --all --name" || echo "false") +EXISTING_CONTAINERS=$(ssh -p "$SSH_PORT" -o StrictHostKeyChecking=no "$SSH_USER"@webapp."$TARGET_SYSTEM" "docker ps -q --all" || echo "false") if [[ "$EXISTING_INSTALL" != "false" && -n "$EXISTING_INSTALL" ]]; then msg "" @@ -418,7 +418,7 @@ fi msg "INFO: Commencing Wire-in-a-box deployment on $TARGET_SYSTEM." preprovision_hetzner -ssh -p "$SSH_PORT" "$DEMO_USER"@webapp."$TARGET_SYSTEM" "bash -s" <