推荐用于CI服务器的Go构建系统?

时间:2014-01-15 10:04:30

标签: go

所以我有一个go-gettable依赖项,测试等项目。

我想将它整合到Jenkins中。除了编写makefile之外,是否存在任何人为此用例推荐的自动构建系统?

我需要:

  1. 自动安装go-get deps(当然,它们可以在spec文件中)
  2. 递归构建。
  3. 运行测试。
  4. GOPATH / GOROOT管理(隔离SDK和路径)
  5. 我过去曾经使用过godag这类工作,但似乎有点没有维护。

    编辑:目前我正在使用以下脚本直接输入Jenkins作为构建步骤:

    #this gets the dependencies but doesn't install them, avoiding permission problems
    go get -d
    
    #build the packages, -x outputs the compiler command line
    go build -x
    
    #this was tricky - ./... means "for each sub-package recursively"
    go test ./... 
    

2 个答案:

答案 0 :(得分:2)

我在运行rake文件的Mac上使用Team City构建服务器,在rake文件中我执行所有命令以获得依赖性,(获取),测试和构建到正确的环境。

如果您想要编写Rake文件,请告诉我们

作为旁注,我一直在使用这个框架工作为REST Api创建功能测试。这已经多次保存了我的代码。 http://github.com/DigitalInnovation/cucumber_rest_api

答案 1 :(得分:0)

自2019年8月起,TeamCity 2019.1现在直接支持Go。
参见“ Building Go programs in TeamCity

  

要在TeamCity中启用Go支持,

     
      
  • 转到Build Configuration Settings | Build Features,      
        
    • 点击Add build feature,然后
    •   
    • 从列表中选择Golang
    •   
  •   

https://d3nmt5vlzunoa1.cloudfront.net/teamcity/files/2019/08/golang-build-feature.png

  

TeamCity提供了对Go的支持,无需任何外部插件。
  TeamCity解析go test命令执行的结果。结果保持不变,并且有可能以历史角度审查这些数字。
  因此,与测试报告相关的所有TeamCity功能现在都可供Go开发人员使用。

相关问题