Brad Fitzpatrick | c53d4ba | 2019-10-17 05:08:40 +0000 | [diff] [blame] | 1 | #!/bin/bash |
Dmitri Shuralyov | 7bf60f0 | 2023-02-28 19:12:21 -0500 | [diff] [blame] | 2 | # Copyright 2022 The Go Authors. All rights reserved. |
Carlos Amedee | e8c8ca1 | 2022-05-31 16:44:49 -0400 | [diff] [blame] | 3 | # Use of this source code is governed by a BSD-style |
| 4 | # license that can be found in the LICENSE file. |
| 5 | |
Brad Fitzpatrick | c53d4ba | 2019-10-17 05:08:40 +0000 | [diff] [blame] | 6 | |
| 7 | # See Makefile for usage |
| 8 | |
| 9 | set -e |
| 10 | |
| 11 | USER_AT_HOST=$1 |
| 12 | if [ "$USER_AT_HOST" = "" ]; then |
| 13 | echo "Missing user@host arg; see Makefile for usage" >&2 |
| 14 | exit 2 |
| 15 | fi |
| 16 | HOST_TYPE=$2 |
| 17 | if [ "$HOST_TYPE" = "" ]; then |
| 18 | echo "Missing host type arg; see Makefile for usage" >&2 |
| 19 | exit 2 |
| 20 | fi |
| 21 | |
| 22 | GOARCH=ppc64le GOOS=linux go build -o rundockerbuildlet.ppc64le golang.org/x/build/cmd/rundockerbuildlet |
| 23 | |
| 24 | rsync -e "ssh -i ~/.ssh/id_ed25519_golang1" -avPW ./ $USER_AT_HOST:./ |
| 25 | scp -i ~/.ssh/id_ed25519_golang1 $HOME/keys/${HOST_TYPE}.buildkey $USER_AT_HOST:.gobuildkey |
| 26 | |
| 27 | # Install Docker, including adding our username to the "docker" group: |
| 28 | ssh -i ~/.ssh/id_ed25519_golang1 $USER_AT_HOST ./install-docker.bash |
| 29 | |
| 30 | # Now that we have Docker, "log in" again (with access to the docker |
| 31 | # group) and do the rest: |
| 32 | ssh -i ~/.ssh/id_ed25519_golang1 $USER_AT_HOST ./install-buildlet.bash $HOST_TYPE |