【问题标题】:Bitbucket To Google app engine Deployment Failed ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: WEB-INF/appengine-web.xml is required for this runtimeBitbucket 到 Google 应用引擎部署失败错误:(gcloud.app.deploy)INVALID_ARGUMENT:此运行时需要 WEB-INF/appengine-web.xml
【发布时间】:2020-10-16 16:33:58
【问题描述】:

我想将 BitBucket 部署到 Google App Engine,我已经使用 bitbucket-cloud/docs/deploy-to-google-cloud/ 这个链接完成了所有配置。我已经完成了 bitbucket-pipelines.yml 如下:-

  image: atlassian/default-image:2

pipelines:
  default:
    - step:
        script:
          - pipe: atlassian/google-app-engine-deploy:0.7.3
            variables:
              KEY_FILE: $KEY_FILE
              PROJECT: 'project_id'
              DEPLOYABLES: 'SlickErp/war/WEB-INF/appengine-web.xml'
              VERSION: '11'
              #BUCKET: 'gs://my-bucket'
              IMAGE: 'gcr.io/my/image'
              PROMOTE: 'true'
              STOP_PREVIOUS_VERSION: 'true'
              #EXTRA_ARGS: '--logging=debug'

并且还在存储库变量中配置了 PROJECT 和 KEY_FILE。 当我运行我的管道部署到谷歌应用引擎时遇到以下问题:-

Digest: sha256:ba2b161552a88f64dc0d3a5efe391aff52b06e16ca9b3933d0f0279869580465
Status: Downloaded newer image for bitbucketpipelines/google-app-engine-deploy:0.7.3
INFO: Setting up environment.
echo "${KEY_FILE}" | base64 -d >> /tmp/key-file.json
gcloud auth activate-service-account --key-file /tmp/key-file.json --quiet --verbosity=warning
Activated service account credentials for: [account@appspot.gserviceaccount.com]
gcloud config set project project_id --quiet --verbosity=warning
Updated property [core/project].
WARNING: You do not appear to have access to project [project_id] or it does not exist.
INFO: Starting deployment to GCP app engine...
gcloud app --quiet deploy SlickErp/war/WEB-INF/appengine-web.xml --version=11 --image-url gcr.io/my/image --promote --stop-previous-version --verbosity=warning
Services to deploy:
descriptor:      [/opt/atlassian/pipelines/agent/build/SlickErp/war/WEB-INF/appengine-web.xml]
source:          [/opt/atlassian/pipelines/agent/build/SlickErp/war]
target project:  [project_id]
target service:  [default]
target version:  [11]
target url:      [https://project_id.an.r.appspot.com]
Beginning deployment of service [default]...
ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: WEB-INF/appengine-web.xml is required for this runtime.
✖ Deployment failed.

我遇到以下错误的问题是什么:-

  ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: WEB-INF/appengine-web.xml is required for this runtime.
    ✖ Deployment failed.

有什么帮助吗? 提前谢谢你

【问题讨论】:

  • 在您分享的教程中提到使用app.yaml 文件而不是appengine-web.xml。另外,我认为您正在部署一个 JAVA 应用程序,并且文件 appengine-web.xml 已被 JAVA 8 弃用。

标签: google-app-engine google-cloud-platform bitbucket


【解决方案1】:

gcloud deploy 找不到 appengine-web.xml 文件,请验证您在 yml 文件中写入的路径是否正确。

【讨论】:

  • 感谢您的回复,我的 appengine-web.xml 文件路径是 SlickErp/war/WEB-INF/appengine-web.xml。我在脚本的 DEPLOYABLES 变量中给出了相同的路径。
猜你喜欢
  • 2021-01-31
  • 1970-01-01
  • 1970-01-01
  • 2015-02-11
  • 2018-05-07
  • 2021-06-19
  • 2019-11-06
  • 2018-10-28
  • 1970-01-01
相关资源
最近更新 更多