如何使用Google Cloud build执行Maven发布插件

时间:2019-01-29 12:03:03

标签: maven maven-release-plugin google-cloud-build

我尝试使用Google Cloud构建来构建托管在Github上的spring boot应用程序。我有一个特定的触发器来执行我的项目的Maven发布。

但是我找不到如何配置git,Maven和cloud-build。

1 个答案:

答案 0 :(得分:0)

我不熟悉maven版本插件,但希望这会很有用:

  • 将云构建配置为github

https://cloud.google.com/cloud-build/docs/running-builds/automate-builds

  • 配置Maven

https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/mvn/examples/spring_boot

  • 可能的配置文件
steps:
# run unit tests
- name: 'gcr.io/cloud-builders/mvn'
  args: ['test']
# prepare release
- name: 'gcr.io/cloud-builders/mvn'
  args: ['release:prepare']
# perform release
- name: 'gcr.io/cloud-builders/mvn'
  args: ['release:perform']