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

huangapple go评论77阅读模式
英文:

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

问题

我正在尝试将一个Spring Boot微服务应用程序从Bitbucket Pipelines部署到Google App Engine。在提交代码后,我遇到了以下错误,

INFO: 设置环境。
echo "${KEY_FILE}" | base64 -d >> /tmp/key-file.json
gcloud auth activate-service-account --key-file /tmp/key-file.json --quiet --verbosity=warning
已激活服务帐户凭据:[testproject-iamserviceaccoun@testproject.iam.gserviceaccount.com]
gcloud config set project testproject --quiet --verbosity=warning
已更新属性 [core/project]。

> INFO: 开始部署到GCP应用引擎...
gcloud app --quiet deploy 'app.yaml' --verbosity=warning
错误:(gcloud.app.deploy) [/opt/atlassian/pipelines/agent/build/app.yaml] 不存在。
✖ 部署失败。

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

bitbucket-pipelines.yml:

pipelines:
  default:
     - step: 
        name: 部署到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: 此字段是必需的,但会被忽略
英文:

I am trying to deploy a spring boot microservices application to Google App Engine from Bitbucket Pipelines. I am getting this below error after commiting the code,

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.**

Please help me to solve this issue. Build Tool used is 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

答案1

得分: 0

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

pipelines:
  default:
    - step:
        name: 部署至 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/

英文:

You need to specify DEPLOYABLES in your bitbucket-pipelines.yml, pointing to the path of your app.yaml file.

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

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

huangapple
  • 本文由 发表于 2020年9月30日 01:24:29
  • 转载请务必保留本文链接:https://go.coder-hub.com/64124633.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定