gitlab-ci: more fixes to deploy

This commit is contained in:
Luke Granger-Brown 2020-05-10 00:12:25 +01:00
parent 493f2382d5
commit 40cee28bd5
2 changed files with 6 additions and 1 deletions

View file

@ -20,12 +20,15 @@ nixCache:
ixvm-fra01: ixvm-fra01:
extends: .deploy extends: .deploy
resource_group: ixvm-fra01
script: './hack/deploy.sh "141.98.136.124" ""' script: './hack/deploy.sh "141.98.136.124" ""'
marukuru: marukuru:
extends: .deploy extends: .deploy
resource_group: marukuru
script: './hack/deploy.sh "103.105.48.15" "-p 20022"' script: './hack/deploy.sh "103.105.48.15" "-p 20022"'
clouvider-fra01: clouvider-fra01:
extends: .deploy extends: .deploy
resource_group: clouvider-fra01
script: './hack/deploy.sh "193.228.196.57" ""' script: './hack/deploy.sh "193.228.196.57" ""'

View file

@ -10,7 +10,9 @@ while read -r manifest_line; do
cp "${!manifest_bits[0]}" "${manifest_bits[1]}" cp "${!manifest_bits[0]}" "${manifest_bits[1]}"
done < "$SECRETS_MANIFEST" done < "$SECRETS_MANIFEST"
if [ -z ${2+x} ]; then ssh_cmd="ssh"; else ssh_cmd="ssh $2"; fi ssh_cmd="ssh -o StrictHostKeyChecking=accept-new"
if [ ! -z ${2+x} ]; then ssh_cmd="$ssh_cmd $2"; fi
echo Syncing repo content to machine "$1" echo Syncing repo content to machine "$1"
rsync -e "$ssh_cmd" -avz --exclude='.hg/' ./ "deployer@$1:depot/" rsync -e "$ssh_cmd" -avz --exclude='.hg/' ./ "deployer@$1:depot/"