From ab87323f2249d99400b91025b20fcf45e9eb5457 Mon Sep 17 00:00:00 2001 From: Michael Tharp Date: Mon, 18 Feb 2019 17:37:36 +0000 Subject: [PATCH] Build arm64 and ppc64le clients --- cmdline/workercmd/handler.go | 2 +- scripts/Dockerfile.clientbuild | 8 +++++--- scripts/build-all.sh | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cmdline/workercmd/handler.go b/cmdline/workercmd/handler.go index 50423c4..896949c 100644 --- a/cmdline/workercmd/handler.go +++ b/cmdline/workercmd/handler.go @@ -63,7 +63,7 @@ func (h *handler) healthCheck() { for { // check if parent process went away if os.Getppid() != ppid { - log.Println("error: parent process disappeared, worker stopping") + log.Println("error: parent process disappeared, worker stopping", ppid, os.Getppid()) h.shutdown() return } diff --git a/scripts/Dockerfile.clientbuild b/scripts/Dockerfile.clientbuild index 1b95a5f..44248d7 100644 --- a/scripts/Dockerfile.clientbuild +++ b/scripts/Dockerfile.clientbuild @@ -8,6 +8,8 @@ RUN dep ensure -vendor-only COPY . . RUN mkdir /out ARG ldflags -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix nocgo -ldflags "$ldflags" -tags clientonly -o /out/relic-client-linux-amd64 -RUN CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -a -installsuffix nocgo -ldflags "$ldflags" -tags clientonly -o /out/relic-client-darwin-amd64 -RUN CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -a -installsuffix nocgo -ldflags "$ldflags" -tags clientonly -o /out/relic-client-windows-amd64.exe +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix nocgo -ldflags "$ldflags" -tags clientonly -o /out/relic-client-linux-amd64 +RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -a -installsuffix nocgo -ldflags "$ldflags" -tags clientonly -o /out/relic-client-linux-arm64 +RUN CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le go build -a -installsuffix nocgo -ldflags "$ldflags" -tags clientonly -o /out/relic-client-linux-ppc64le +RUN CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -a -installsuffix nocgo -ldflags "$ldflags" -tags clientonly -o /out/relic-client-darwin-amd64 +RUN CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -a -installsuffix nocgo -ldflags "$ldflags" -tags clientonly -o /out/relic-client-windows-amd64.exe diff --git a/scripts/build-all.sh b/scripts/build-all.sh index b8d3d52..5b8a466 100755 --- a/scripts/build-all.sh +++ b/scripts/build-all.sh @@ -42,6 +42,7 @@ xgo \ --out="build/relic" \ -ldflags "$ldflags" \ . +sudo chown $(id -u) build/* mv build/relic-darwin-*-amd64 build/relic-darwin-amd64 mv build/relic-windows-*-amd64.exe build/relic-windows-amd64.exe