【问题标题】:YAML unmarshal error cannot unmarshal !!str ` ` to strYAML 解组错误无法将 !!str ` ` 解组为 str
【发布时间】:2018-10-04 07:26:02
【问题描述】:

我正在尝试通过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 
  }

【问题讨论】:

标签: manifest cloud-foundry


【解决方案1】:

您的清单无效。 @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 而不是 pathsservices 是一个数组。我认为最后一个是 cli 抱怨最多的。

希望有帮助!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-07
    • 2013-11-16
    • 1970-01-01
    • 2021-04-24
    • 1970-01-01
    • 2021-01-11
    相关资源
    最近更新 更多