Brett Y
Brett Y

Reputation: 7678

Invalid step structure

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)

Upvotes: 2

Views: 741

Answers (1)

Brett Y
Brett Y

Reputation: 7678

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

Upvotes: 1

Related Questions