doudu9094
2016-05-16 20:27
浏览 321
已采纳

Jenkins为Go Projects构建设置

We are planning to setup Jenkin Build process for Go Projects. I setup Custom Workspace in jenkins and installing go1.6 from "Global Tool Configuration".

I am getting error message while executing go build Below is the GOPATH and GOROOT

GOPATH /var/lib/jenkins/workspace/project/go
GOROOT  /var/lib/jenkins/workspace

ain.go:20:2: cannot find package "bytes" in any of:
    /var/lib/jenkins/workspace/src/pkg/bytes (from $GOROOT)
    /var/lib/jenkins/workspace/project/go/src/bytes (from $GOPATH)

What I am missing here?.. Thanks for your help..

图片转代码服务由CSDN问答提供 功能建议

我们计划为Go项目设置Jenkin Build流程。 我在jenkins中设置了自定义工作区,并从“全局工具配置”中安装了go1.6。

我在执行 go build 时收到错误消息,下面是GOPATH 和GOROOT

  GOPATH / var / lib / jenkins / workspace / project / go 
GOROOT / var / lib / jenkins / workspace 
   \  n 
 
  ain.go:20:2:在以下任何位置都找不到包“ bytes”:
 / var / lib / jenkins / workspace / src / pkg / bytes  (来自$ GOROOT)
 / var / lib / jenkins / workspace / project / go / src / bytes(来自$ GOPATH)
   
 
 

我在这里缺少的内容 ?..谢谢您的帮助。

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

5条回答 默认 最新

相关推荐 更多相似问题