【发布时间】:2017-07-03 14:54:03
【问题描述】:
我有一个在 Google Cloud Platform 中运行的 .Net AppEngine 应用程序,我可以使用自己的凭据从命令行部署它。我现在想从我的 Appveyor CI 管道中部署它。我已加密服务帐户 json 文件并希望在我的部署脚本中使用它。我天真地在 appveyor.yml 的 deploy_script 部分尝试了以下脚本:
dotnet publish -c Release
gcloud auth activate-service-account xxx@appspot.gserviceaccount.com --key-file="xxx.json"
gcloud beta app deploy src/kinetics.webapi/bin/Release/netcoreapp1.1/publish/app.yaml
Appveyor 不知道 Google SDK,因为我得到了错误
gcloud auth activate-service-account xxx@appspot.gserviceaccount.com --key-file="xxx.json" 'gcloud' 未被识别为内部或外部命令, 可运行的程序或批处理文件。
如何在 Appveyor 中使用 gcloud?我想我可以使用 Nuget 安装整个 Google SDK,但这对于 CI 服务器来说似乎有点耗时。有没有更轻量级的方法?
【问题讨论】:
标签: .net google-app-engine google-cloud-platform appveyor