CircleCi YAML配置提供了意外的字符串错误

时间:2020-08-19 13:26:05

标签: yaml circleci

尽管使用复制和粘贴,当我尝试使用验证我的YAML时,我仍然收到以下错误

circleci config validate

我收到此错误

Error: Unable to parse YAML
while parsing a block mapping
 in 'string', line 30, column 5:
        <<: *defaults
        ^
expected <block end>, but found '<block mapping start>'
 in 'string', line 31, column 7:
          steps:
          ^

导致错误的Yaml是deploy-job-canada:

  # Deploy the project to google
  deploy-job:
    <<: *defaults
    steps:
      - attach_workspace:
          at: ~/repo
      - run:
          name: Firebase set project-id
          command: ./node_modules/.bin/firebase use production --token=$FIREBASE_DEPLOY_TOKEN
      - run:
          name: Deploy Master to Firebase
          command: ./node_modules/.bin/firebase deploy --token=$FIREBASE_DEPLOY_TOKEN

  deploy-job-canada:
    <<: *defaults
      steps:
        - attach_workspace:
            at: ~/repo
        - run:
            name: Firebase set project-id
            command: ./node_modules/.bin/firebase use canada --token=$FIREBASE_DEPLOY_TOKEN_CANADA
        - run:
            name: Deploy Master to Firebase
            command: ./node_modules/.bin/firebase deploy --token=$FIREBASE_DEPLOY_TOKEN_CANADA

作为参考,如果我只包括deploy-job,它可以很好地工作,我完全复制了该作业,因此非常困惑如何以该错误结束

0 个答案:

没有答案