YAML解组错误无法将!! str``解组为str

时间:2018-10-04 07:26:03

标签: manifest pivotal-cloud-foundry

我正在尝试通过manifest.yml文件在Pivotal Cloud Foundry(PCF)上推送Spring Boot应用程序。

在推送应用程序时,出现以下错误:

{ 
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 
  }

1 个答案:

答案 0 :(得分:0)

您的清单无效。 @ 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抱怨最多的事情。

希望有帮助!