deployment: Envoy cross platform improvements (#701)

* Share processgroup on all platforms

* Fix cross platform release handling
This commit is contained in:
Travis Groth 2020-05-14 15:16:24 -04:00
parent d58f68ab15
commit 65bb1501fd
4 changed files with 14 additions and 6 deletions

View file

@ -6,6 +6,10 @@ release:
name: pomerium
name_template: "v{{.Version}}"
env:
- GO111MODULE=on
- CGO_ENABLED=0
before:
hooks:
- go mod download
@ -15,8 +19,6 @@ builds:
- id: pomerium
main: cmd/pomerium/main.go
binary: pomerium
env:
- CGO_ENABLED=0
goarch:
- amd64
goos:
@ -32,13 +34,14 @@ builds:
- -X github.com/pomerium/pomerium/internal/version.ProjectURL=https://wwww.pomerium.io
hooks:
post: ./scripts/embed-envoy.bash {{ .Path }}
post:
- cmd: ./scripts/embed-envoy.bash {{ .Path }}
env:
- GOOS={{ .Target }}
- id: pomerium-cli
main: cmd/pomerium-cli/cli.go
binary: pomerium-cli
env:
- CGO_ENABLED=0
goarch:
- amd64
- arm

View file

@ -5,5 +5,6 @@ package envoy
import "syscall"
var sysProcAttr = &syscall.SysProcAttr{
Setpgid: true,
Pdeathsig: syscall.SIGTERM,
}

View file

@ -4,4 +4,6 @@ package envoy
import "syscall"
var sysProcAttr = &syscall.SysProcAttr{}
var sysProcAttr = &syscall.SysProcAttr{
Setpgid: true,
}

View file

@ -5,6 +5,8 @@ BINARY=$1
ENVOY_VERSION=1.14.1
DIR=$(dirname "${BINARY}")
GOOS=$(echo "${GOOS-}" | cut -d _ -f 1) # goreleaser is fine
GOOS=$(go env GOOS)
if [ "${GOOS}" == "darwin" ]; then