我正在尝试通过
manifest.yml
文件将我的 Spring Boot 应用程序推送到 Pivotal Cloud Foundry (PCF) 上。
在推送应用程序时,我收到以下错误:
{
Pushing from manifest to org mastercard_connect / space developer-sandbox as e069875...
Using manifest file C:\Sayli\Workspace\PCF\healthwatch-api\healthwatch-api\manifest.yml
yaml: unmarshal errors:
line 6: cannot unmarshal !!str `healthw...` into []string
FAILED }
这是
manifest.yml
文件:
{applications:
- name: health-watch-api
memory: 2GB
instances: 1
paths: healthwatch-api-jar\target\healthwatch-api-jar-0.0.1-SNAPSHOT.jar
services: healthwatch-api-database
}
您的舱单无效。 @K.AJ 发布的链接是一个很好的参考。
https://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html
这是一个示例,它使用文件中的值。
---
applications:
- name: health-watch-api
memory: 2G
path: healthwatch-api-jar/target/healthwatch-api-jar-0.0.1-SNAPSHOT.jar
services:
- healthwatch-api-database
您不需要前导/尾随
{
}
,它是 path
而不是 paths
并且 services
是一个数组。我认为最后一个是 cli 抱怨最多的。
希望有帮助!
我在使用 Pulumi 和 GitHub Actions 时遇到此错误。原因是 GH yaml 配置中没有可用的变量。这导致我尝试添加到
pulumi.dev.yaml
的值被添加为“null”;纠正这个问题后,我可以看到正确的值。
当您使用的服务期望以不同方式写入manifest.yml 文件时,也会发生Unmarshal 错误。 您可以参考文档来查看文档并在清单文件中提及与服务的 apt 版本相对应的版本。