我正在尝试使用 Skaffold、Dekorate 和 Spring Boot。
我找不到任何使用 Spring Boot 2.3+ 的新 buildpack 功能的示例
apiVersion: skaffold/v2beta9
kind: Config
metadata:
name: tellus-upgrade
build:
artifacts:
- image: tellus-admin
custom:
buildCommand: ./mvnw -pl tellus-admin org.springframework.boot:spring-boot-maven-plugin:2.4.0:build-image -Dspring-boot.build-image.imageName=$IMAGE -Drevision=dev-SNAPSHOT -DskipTests=true
dependencies:
paths:
- tellus-admin/src
- tellus-admin/pom.xml
- image: tellus-config-server
custom:
buildCommand: ./mvnw -pl tellus-config-server org.springframework.boot:spring-boot-maven-plugin:2.4.0:build-image -Dspring-boot.build-image.imageName=$IMAGE -Drevision=dev-SNAPSHOT -DskipTests=true
dependencies:
paths:
- tellus-config-server/src
- tellus-config-server/pom.xml
deploy:
kubectl:
manifests:
- kubernetes/defaults.yml
- kubernetes/db/kubernetes.yml
- kubernetes/dev/dnsutils.yml
- kubernetes/kafka-connect/kubernetes.yml
- tellus-admin/target/classes/META-INF/dekorate/kubernetes.yml
- tellus-config-server/target/classes/META-INF/dekorate/kubernetes.yml
当我运行 skaffold dev 时出现错误:exiting dev mode because first build failed: the custom script didn't generate an image with tag [tellus-config-server:RELEASE_2020_2_0-226-g9be76a373-dirty]
然而,从日志看来,图像是构建的......
[INFO] Successfully built image 'docker.io/library/tellus-config-server:RELEASE_2020_2_0-226-g9be76a373-dirty'
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.004 s
[INFO] Finished at: 2020-11-15T22:31:59+11:00
[INFO] ------------------------------------------------------------------------
Building [tellus-admin]...
exiting dev mode because first build failed: the custom script didn't produce an image with tag [tellus-config-server:RELEASE_2020_2_0-226-g9be76a373-dirty]