From 3f5d27cd5da8f3ad53e4b794d34703922c9b824e Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Wed, 4 Mar 2020 13:19:25 -0700 Subject: ci: Optimize published artifacts (#3118) Build the published executables with CGO disabled, stripped, and with `-trimpath` for more reproducible build --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'azure-pipelines.yml') diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0695417..21be1f1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -100,7 +100,7 @@ jobs: workingDirectory: '$(modulePath)' displayName: Get dependencies - - bash: go build -v + - bash: CGO_ENABLED=0 go build -trimpath -a -ldflags="-w -s" -v workingDirectory: '$(modulePath)/cmd/caddy' displayName: Build Caddy -- cgit v1.2.3