Workflows "Config does not conform to schema" error


#1

Hi there!

Looking forward to using workflows. After following the documentation to migrate from 1.0 to 2.0 config, all seems correct, however i get i get an error message that could potentially be improved when i run a build:
“We weren’t able to start this workflow.
Encountered errors trying to create workflows from this config: Config does not conform to schema: {:workflows {:build-and-deploy {:jobs [nil {:deploy (not (map? nil)), :requires (not (map? a-clojure.lang.LazySeq))}]}}}
For more examples see the Workflows documentation.”

I’ve used the cli tool to validate the config. I’ve also stripped down to a very basic config just to try to get the thing running (pasted below). Seems like i’ve made some kind of mistake, but given the error message i can’t figure out what it is.

version: 2

jobs:
  build:
    machine: &id001
      environment:
        NODE_ENV: test
        ...
      node:
        version: 6
    steps:
      - checkout
      - run: npm install
      ...

  deploy:
    machine: *id001
    steps:
      - checkout
      - run: npm install
      - run: npm run deploy:staging

workflows:
  version: 2
  build-and-deploy:
    jobs:
      - build
      - deploy:
        requires:
          - build

Tag filter not triggering build
Github Integration - setup no longer working
Why wont this simple fan out workflow trigger a build
#2

Hi,

This is just a guess, but can you try it with the requires key indented two spaces and the - build underneath it two more space indented also?

Thanks,
Michelle


#3

Yup, that was totally it! Good eye!
I botched the config in such a way that it got passed validators. I’m so good at botching configs.


#4

yaml is so unforgiving! glad it worked!


#5