hack/deploy: use switch-prebuilt
This commit is contained in:
parent
be5eee48b3
commit
ed1c39a5f1
1 changed files with 2 additions and 7 deletions
|
@ -8,15 +8,10 @@ set -euo pipefail
|
||||||
|
|
||||||
./hack/populate_secrets.sh
|
./hack/populate_secrets.sh
|
||||||
|
|
||||||
ssh_cmd="ssh -o StrictHostKeyChecking=accept-new"
|
|
||||||
|
|
||||||
if [ ! -z ${2+x} ]; then ssh_cmd="$ssh_cmd $2"; fi
|
if [ ! -z ${2+x} ]; then ssh_cmd="$ssh_cmd $2"; fi
|
||||||
|
|
||||||
system="$(nix run nixpkgs.jq -c jq -r ".[\"${1}\"]" systems.json)"
|
system="$(nix run nixpkgs.jq -c jq -r ".[\"${1}\"]" systems.json)"
|
||||||
echo System is $system
|
echo System is $system
|
||||||
|
|
||||||
echo Syncing repo content to machine "$1"
|
ssh_cmd="ssh -o StrictHostKeyChecking=accept-new"
|
||||||
rsync -e "$ssh_cmd" -avz --exclude='.hg/store/data/' --exclude='.hg/store/dh/' --exclude='.hg/cache/' --exclude='.hg/wcache/' ./ "deployer@$1:depot/"
|
$ssh_cmd -t "deployer@$1" switch-prebuilt "$system"
|
||||||
|
|
||||||
echo Triggering rebuild
|
|
||||||
$ssh_cmd -t "deployer@$1" rebuilder ./depot
|
|
||||||
|
|
Loading…
Reference in a new issue