Tags not building on CircleCI with Workflows

circle.yml

#1

When deploying a repository using the following workflow as documented at https://circleci.com/docs/2.0/workflows/#git-tag-job-execution:

workflows:
  version: 2
  build:
    jobs:
      - build:
        filters:
          tags:
            only: /.*/

Our builds are not being triggered. By looking into the workflow view, we can see the error:

Encountered errors trying to create workflows from this config: Config does not conform to schema: {:workflows {:build {:jobs [{:build (not (map? nil)), :filters {:tags disallowed-key}}]}}}

If this is disallowed, what is the correct syntax to build a tag?


#2

Interestingly enough circle.yml seems to validate fine against the client:

$ circleci config validate -c .circleci/config.yml

  config file is valid

#3

I’ve only used branch filters, so I won’t promise your exact tags syntax is perfect, but you do require a little more indentations:

workflows:
  version: 2
  build:
    jobs:
      - build:
          filters:  # indent this and below 2 more spaces
            tags:
              only: /.*/

#4

@CJBridges that should work, thank you. I can’t believe I missed that, and by reading the schema error again that does seem to be the issue.

It would be nice in the future if circleci config validate performed schema validation against the config. prettifying the schema output would be a lot more helpful to read as well.

EDIT: yes that was the issue. Thank you.


#5