【发布时间】:2021-02-08 17:30:03
【问题描述】:
我的 Spring Boot 应用程序在云构建和部署中运行良好,直到 9 月没有任何问题。 现在我的触发器在 gcloud 应用部署中失败了。
第 4 步:错误:(gcloud.app.deploy) INVALID_ARGUMENT:部署无法使用预构建的映像。预构建的图片只能在 App Engine 柔性环境中使用。
app.yaml
runtime: java11
env: standard
service: service
handlers:
- url: /.*
script: this field is required, but ignored
cloudbuild.yaml
steps:
# backend deployment
# Step 1:
- name: maven:3-jdk-14
entrypoint: mvn
dir: 'service'
args: ["test"]
# Step 2:
- name: maven:3-jdk-14
entrypoint: mvn
dir: 'service'
args: ["clean", "install", "-Dmaven.test.skip=true"]
# Step 3:
- name: docker
dir: 'service'
args: ["build", "-t", "gcr.io/service-base/base", "."]
# Step 4:
- name: "gcr.io/cloud-builders/docker"
args: ["push", "gcr.io/service-base/base"]
# Step 5:
- name: 'gcr.io/cloud-builders/gcloud'
dir: 'service/src/main/appengine'
args: ['app', 'deploy', "--image-url=gcr.io/service-base/base"]
timeout: "30m0s"
# Step 6:
# dispatch.yaml deployment
- name: "gcr.io/cloud-builders/gcloud"
dir: 'service/src/main/appengine'
args: ["app", "deploy", "dispatch.yaml"]
timeout: "30m0s"
timeout: "100m0s"
images: ["gcr.io/service-base/base"]
提前致谢。我很困惑我的构建之前是如何正常工作的以及我现在做错了什么。
【问题讨论】:
标签: spring-boot google-app-engine google-cloud-platform gcloud