blob: de32bce7fce83f5a3a66b9290019c4544bbd7ae2 [file] [log] [blame]
Brad Fitzpatrickc53d4ba2019-10-17 05:08:40 +00001#!/bin/bash
Dmitri Shuralyov7bf60f02023-02-28 19:12:21 -05002# Copyright 2022 The Go Authors. All rights reserved.
Carlos Amedeee8c8ca12022-05-31 16:44:49 -04003# Use of this source code is governed by a BSD-style
4# license that can be found in the LICENSE file.
5
Brad Fitzpatrickc53d4ba2019-10-17 05:08:40 +00006
7# See Makefile for usage
8
9set -e
10
11USER_AT_HOST=$1
12if [ "$USER_AT_HOST" = "" ]; then
13 echo "Missing user@host arg; see Makefile for usage" >&2
14 exit 2
15fi
16HOST_TYPE=$2
17if [ "$HOST_TYPE" = "" ]; then
18 echo "Missing host type arg; see Makefile for usage" >&2
19 exit 2
20fi
21
22GOARCH=ppc64le GOOS=linux go build -o rundockerbuildlet.ppc64le golang.org/x/build/cmd/rundockerbuildlet
23
24rsync -e "ssh -i ~/.ssh/id_ed25519_golang1" -avPW ./ $USER_AT_HOST:./
25scp -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:
28ssh -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:
32ssh -i ~/.ssh/id_ed25519_golang1 $USER_AT_HOST ./install-buildlet.bash $HOST_TYPE