我已经安装并运行了gcloud,并且还激活了服务帐户。我执行以下操作并获得成功(?):
$ gcloud auth activate-service-account "${GAE_CLIENT_ACCOUNT}" --key-file "${GAE_CLIENT_KEY_JSON_FILE}"
Activated service account credentials for: [xxxxx@developer.gserviceaccount.com]
然后我运行:
$ gcloud preview app deploy app.yaml --project "${GAE_PROJECT_ID}" --quiet --version "${GAE_PROJECT_VERSION}"
You are about to deploy the following modules:
- ricochet-robots/default/dev From: [/home/travis/build/ricochetrobots/ricochetrobots-landing/app.yaml]
Updating module [default]...Go to the following link in your browser:
https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&client_id=xxxxxxxx.apps.googleusercontent.com&access_type=offline
Updating module [default].../
正如您所看到的,它会提示我按照链接进行操作。因为我在ci服务器上,所以无法关注该链接。 我怎么压抑那个?或者是否有一种完全不同的方式自动部署应用程序。
答案 0 :(得分:4)
这是版本0.9.61中的known issue。
目前,您可以通过固定到以前的版本来解决:
gcloud config set component_manager/fixed_sdk_version 0.9.60
gcloud components update
由于您在CI服务器中运行,因此如果在脚本中运行gcloud components update
,还可以设置以下环境变量。这可能是一种更简单的修复方法,具体取决于您的CI服务器。
CLOUDSDK_COMPONENT_MANAGER_SNAPSHOT_URL=https://dl.google.com/dl/cloudsdk/release/components-v0.9.60.json
使用服务帐户运行gcloud preview app deploy --set-default
在版本0.9.57到0.9.62中具有相同的问题。如果您想使用此命令,可以固定为0.9.56。
我们正在针对版本0.9.63或之后不久修复此问题。请关注gcloud错误跟踪器上的问题以获取更多更新。
编辑:此问题已在0.9.63版中修复。