Google app engine 使用google app engine部署Gitlab CI时出现权限错误
我尝试与Gitlab和Google AppEngine进行完整的集成部署过程 但部署失败,因为我似乎错过了权限。我真的不知道这里需要什么权利 我激活了应用程序引擎API和云构建API 我的服务拥有以下权利: 我的gitlab-ci.yml文件:Google app engine 使用google app engine部署Gitlab CI时出现权限错误,google-app-engine,gitlab,google-app-engine-python,Google App Engine,Gitlab,Google App Engine Python,我尝试与Gitlab和Google AppEngine进行完整的集成部署过程 但部署失败,因为我似乎错过了权限。我真的不知道这里需要什么权利 我激活了应用程序引擎API和云构建API 我的服务拥有以下权利: 我的gitlab-ci.yml文件: Staging Deployment: stage: Deploy environment: name: Staging before_script: - echo "deb http://packages.cloud.go
Staging Deployment:
stage: Deploy
environment:
name: Staging
before_script:
- echo "deb http://packages.cloud.google.com/apt cloud-sdk-jessie main" | tee /etc/apt/sources.list.d/google-cloud-sdk.list
- curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
- apt-get update
- apt-get -qq -y install google-cloud-sdk
script:
- echo $DEPLOY_KEY_FILE_PRODUCTION > /tmp/$CI_PIPELINE_ID.json
- gcloud auth activate-service-account --key-file /tmp/$CI_PIPELINE_ID.json
- gcloud config list
- gcloud config set project $PROJECT_ID_PRODUCTION
- gcloud --quiet --project $PROJECT_ID_PRODUCTION app deploy gae/test.yml
only:
refs:
- master
最后是我的测试。yml:
# [START django_app]
runtime: python37
service: testing
entrypoint: gunicorn -b :$PORT manta.wsgi --timeout 120
default_expiration: "5m"
env_variables:
DJANGO_SETTINGS_MODULE: manta.settings.dev
handlers:
# This configures Google App Engine to serve the files in the app's
# static directory.
- url: /static
static_dir: static/
# This handler routes all requests not caught above to the main app.
# It is required when static routes are defined, but can be omitted
# (along with the entire handlers section) when there are no static
# files defined.
- url: /.*
script: auto
# [END django_app]
以及我在部署期间遇到的错误:
ERROR: (gcloud.app.deploy) Permissions error fetching application [apps/testing]. Please make sure you are using the correct project ID and that you have permission to view applications on the project.
将
--log http--verbosity=debug
标志添加到gcloud app deploy
命令可能会显示导致错误的其他信息。还要确保您使用的项目ID正确。@Tartempion34您找到解决方案了吗?我也有同样的问题将--log http--verbosity=debug
标志添加到gcloud app deploy
命令可能会显示导致错误的其他信息。还要确保您使用的项目ID正确。@Tartempion34您找到解决方案了吗?我也有同样的问题