Hi,
I’m trying to run a build job on every commit, but also at a given time every weekday.
I have the jobs section working properly, but whenever I try to add the workflows, I get the error:
We weren’t able to start this workflow. Job “build” has filters configured in the job definition. These filters are incompatible with workflows.`
Encountered errors trying to create workflows from this config: Config does not conform to schema: {:workflows {:nightly {:triggers [{:schedule {:filters missing-required-key}}]}}}
Try turning on your invisible characters in your editor to see if you have any tabs - they need to be spaces. Also, it might be worth looking at your line endings in case Windows 10/13 chars are confusing the parser.
Have you removed the branches section from jobs in the copy you are trying? It is still in your version above.
Thank you very much… I think you were right on the indentation, because a variant of your workflow magically works for me!
Followup questions:
It seems that if I use workflows, I need to create a commit-workflow, which is fine… except that CircleCI will run parallel builds for each commit now. Can I enforce that only one build can be run at a time?
Can I filter the commit-workflow to only run on certain branches?
For question #2, I added the filter under triggers in the commit workflow and it seems to work. You can also add it directly without triggers, but note that the syntax is actually different
commit-workflow:
jobs:
- build:
filters:
branches:
only: development