From 61a2f9ce744b900092b3ee4f566b8aa3751919a2 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Fri, 21 Apr 2017 02:27:19 +0200 Subject: [PATCH] Jenkinsfile: Fix path environment variables. --- Jenkinsfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0de24a6..05e0ede 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,7 +31,6 @@ def upx(file) { def withGoEnv(os, arch, f) { // Install go env.GOROOT = tool "Go 1.7" - env.GOPATH = env.WORKSPACE switch(arch) { case "x64": @@ -50,7 +49,13 @@ def withGoEnv(os, arch, f) { break } - withEnv(["CGO_ENABLED=1", "GOOS=${os}", "GOARCH=${arch}"]) { + withEnv([ + "CGO_ENABLED=1", + "GOARCH=${arch}", + "GOOS=${os}", + "GOPATH=${env.WORKSPACE}/.go", + "PATH+=${env.GOROOT}/bin:${env.WORKSPACE}/.go/bin", + ]) { switch(arch) { case "armv5": withEnv("GOARM=5", f)