Invalid step structure

我的梦境 提交于 2020-02-05 06:15:07

问题


I believe my configuration is valid after reading the CircleCi workflow documentation but I am still getting the error below. What is wrong with my configuration?

Here is my workflow configuration:

workflows:
  version: 2
  build_assemble_deploy:
    jobs:
      - build
      - assemble:
          requires:
            - build
          filters:
            branches:
              only: master
      - deploy:
          requires:
            - assemble
          filters:
            branches:
              only: master

And here is the full error CircleCi gives me:

Build-agent version 0.1.799-f865b43f (2018-10-11T12:48:06+0000) Configuration errors: 1 error occurred:

  • In step 2 definition: Invalid step structure (expected string or map, got config.StepDescription)

回答1:


The workflow configuration is fine. The issue is in the definition of step 2, in this case the definition of the assemble job. The definition is found in the configuration under job: > assemble:.

In this case the issue was an extra - character. This was the configuration:

- attach_workspace:
    - at: ~/dir

The correct configuration is:

- attach_workspace:
    at: ~/dir


来源:https://stackoverflow.com/questions/56773696/invalid-step-structure

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!