我正在尝试建立Google Cloud Builder构建触发器,以自动构建ASP.NET Core应用并将其部署到Google AppEngine。
使用当前的cloudbuild.yaml:
steps:
- name: 'gcr.io/cloud-builders/dotnet'
args: [ 'publish', '-c', 'Release' ]
- name: 'gcr.io/cloud-builders/gcloud'
args: ['app','deploy','./bin/Release/netcoreapp2.1/publish/app.yaml']
Run Code Online (Sandbox Code Playgroud)
我已经使用cloud-build-local工具测试了本地构建工作。
这两种方法在本地有效:
cloud-build-local --config=cloudbuild.yaml --dryrun=false .cloud-build-local --config=clearbooks-rest-aspnetcore/cloudbuild.yaml --dryrun=false clearbooks-rest-aspnetcore构建触发器定义似乎部分支持来自存储库根目录(方法2)的子目录中的配置文件,但是似乎假设代码始终位于存储库根目录中。
如何配置Cloud Builder在存储库的子目录中启动构建?