mirror of https://github.com/icedream/icecon.git
Jenkinsfile: Fix path environment variables.
parent
8d7e33545a
commit
61a2f9ce74
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue