depot/hack/deploy.sh

19 lines
402 B
Bash
Raw Normal View History

#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
#
# SPDX-License-Identifier: Apache-2.0
set -euo pipefail
./hack/populate_secrets.sh
ssh_cmd="ssh -o StrictHostKeyChecking=accept-new"
2020-05-09 23:12:25 +00:00
if [ ! -z ${2+x} ]; then ssh_cmd="$ssh_cmd $2"; fi
2021-03-20 13:11:23 +00:00
system="$(jq -r ".[\"${1}\"]" systems.json)"
echo System is $system
2021-03-20 13:03:07 +00:00
$ssh_cmd -t "deployer@$1" switch-prebuilt "$system"