我尝试部署时出现Ruby错误的CodeDeploy

时间:2017-10-11 13:36:29

标签: amazon-web-services aws-code-deploy

appspec.yml:

version: 0.0
os: linux
files:
  - source: /
    destination: /var/ingester
permissions:
  - object: /var
    pattern: ingester
    owner: ubuntu
    group: ubuntu
    type:
      - directory
  - object: /var/ingester
    owner: ubuntu
    group: ubuntu
hooks:
  ApplicationStart:
    - location: deployment/start.sh
      runas: ubuntu

Codedeploy获取BeforeInstall,然后使用:

获取错误
  

错误[codedeploy-agent(2735)]:InstanceAgent :: Plugins :: CodeDeployPlugin :: CommandPoller:执行期间出错:TypeError - 没有将String隐式转换为整数 - / opt / codedeploy-agent / lib / instance_agent / plugins /codedeploy/application_specification/application_specification.rb:49:in` []'

看起来好像这与解析YAML有关,但我无法弄清楚它在尝试(和失败)转换为整数的过程。

有人能发现这里出了什么问题吗?

1 个答案:

答案 0 :(得分:0)

在Ravi提示(参见OP评论)之后,我检查了EC2盒子上的appspec.yml,它似乎是一个旧版本,在YAML中source:之前缺少连字符。因此,Ruby将其解释为哈希而不是数组。

相关问题