Bitbucket to Google App Engine Deployment failed - ERROR: (gcloud.app.deploy) [/opt/atlassian/pipelines/agent/build/app.yaml] does not exist

Bitbucket to Google App Engine Deployment failed - ERROR: (gcloud.app.deploy) [/opt/atlassian/pipelines/agent/build/app.yaml] does not exist

我正在尝试将 spring 引导微服务应用程序从 Bitbucket Pipelines 部署到 Google App Engine。提交代码后出现以下错误,

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: [testproject-iamserviceaccoun@testproject.iam.gserviceaccount.com]  
gcloud config set project testproject --quiet --verbosity=warning  
Updated property [core/project].  

> *INFO: Starting deployment to GCP app engine...*  
gcloud app --quiet deploy 'app.yaml' --verbosity=warning  
**ERROR: (gcloud.app.deploy) [/opt/atlassian/pipelines/agent/build/app.yaml] does not exist.  
✖ Deployment failed.**

请帮我解决这个问题。使用的构建工具是 Maven。

bitbucket-pipelines.yml:

pipelines:
  default:
     - step: 
        name: Deploy to Google cloud
        deployment: test
        script: 
          - pipe: atlassian/google-app-engine-deploy:0.7.3
            variables: 
              KEY_FILE: $KEY_FILE
              PROJECT: 'testproject'

src/main/appengine/app.yaml:

runtime: java
env: flex

handlers:
- url: /.*
  script: this field is required, but ignored

您需要在 bitbucket-pipelines.yml 中指定 DEPLOYABLES,指向 app.yaml 文件的路径。

pipelines:
  default:
     - step: 
        name: Deploy to Google cloud
        deployment: test
        script: 
          - pipe: atlassian/google-app-engine-deploy:0.7.3
            variables: 
              KEY_FILE: $KEY_FILE
                  PROJECT: 'testproject'
                  DEPLOYABLES: src/main/appengine/app.yaml

参考:https://bitbucket.org/atlassian/google-app-engine-deploy/src/master/