英文:
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/
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论