Jenkinsfile: Fix path environment variables.

pull/10/head
Icedream 2017-04-21 02:27:19 +02:00
parent 8d7e33545a
commit 61a2f9ce74
Signed by: icedream
GPG Key ID: 1573F6D8EFE4D0CF
1 changed files with 7 additions and 2 deletions

9
Jenkinsfile vendored
View File

@ -31,7 +31,6 @@ def upx(file) {
def withGoEnv(os, arch, f) { def withGoEnv(os, arch, f) {
// Install go // Install go
env.GOROOT = tool "Go 1.7" env.GOROOT = tool "Go 1.7"
env.GOPATH = env.WORKSPACE
switch(arch) { switch(arch) {
case "x64": case "x64":
@ -50,7 +49,13 @@ def withGoEnv(os, arch, f) {
break 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) { switch(arch) {
case "armv5": case "armv5":
withEnv("GOARM=5", f) withEnv("GOARM=5", f)