端到端的GoLang构建流水线示例

huangapple go评论67阅读模式
英文:

Examples of end-to-end GoLang build pipeline

问题

构建用于Go语言应用程序的端到端流水线时,似乎很少有关于示例和最佳实践的信息,该流水线可以实现以下功能:

  • 计算下一个版本(类似于semantic-release
  • 运行所有测试
  • 为不同的支持平台构建(Linux、FreeBSD、Mac OS X、Windows)*(amd64、386、arm、s390x、ppc64le)
  • 在源代码管理系统(github | gitlab | bitbucket)中进行标记和发布
  • 可选择创建软件包(deb、rpm、snaps、flatpaks、brew taps、Inno Setup)
  • 在(TravisCI | CircleCI | Jenkins | Bamboo | 其他)中集成运行

是否有关于此的任何文档或示例项目?我已经查看了一些更著名的Go项目(kubernetes、hashicorp/*等),它们似乎都将这部分内容排除在项目之外。

英文:

There seems to be little information around examples and best practices when building an end-to-end pipeline for a Go Lang application that can:

  • Calculate next version (ala semantic-release)
  • Run all tests
  • Build for the different supported platforms ((Linux, FreeBSD, Mac OS X, Windows) * (amd64, 386, arm, s390x, ppc64le))
  • Tag and Release in a SCM (github | gitlab | bitbucket)
  • Optionally create packages (deb, rpm, snaps, flatpaks, brew taps, Inno Setup).
  • Run this integrated in (TravisCI | CircleCI | Jenkins | Bamboo | others)

Is there any documentation, example project at this regard? I've checked some of the more famous Go projects (kubernetes, hashicorp/* and others) and they all seem to leave this part outside of the project.

答案1

得分: 4

我不确定这是否是你需要的,但你可以看一下这个goreleaser

GoReleaser可以为多个平台构建Go二进制文件,创建GitHub发布,并将Homebrew公式推送到存储库中。所有这些都可以在你喜欢的CI环境中完成。

英文:

I am not sure if this is what you need, but you can take a look at this one goreleaser.

> GoReleaser builds Go binaries for several platforms, creates a GitHub
> release and then pushes a Homebrew formula to a repository. All that
> wrapped in your favorite CI.

huangapple
  • 本文由 发表于 2017年7月4日 08:43:54
  • 转载请务必保留本文链接:https://go.coder-hub.com/44895454.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定