Triggering build on changes to only one branch when using a workflow


#1

Hello,

I’ve puzzled through all of the documentation and am still stumped. I want to trigger builds on checkins to only one branch and I am using workflows.

https://circleci.com/docs/2.0/configuration-reference/#branches says: “If you are using Workflows, job-level branches will be ignored and must be configured in the Workflows section of your config.yml file. See the workflows section for details.”

The workflows section only offers one type of trigger: “triggers N String Should currently be schedule.” https://circleci.com/docs/2.0/configuration-reference/#workflows which seems to imply that only scheduled builds can be set to trigger on only a specified branch.

Is it currently possible to trigger a build on one branch if I’m using workflows?

Thanks!
-Al


#2

Of course, immediately after posting I figured it out. In another doc, I stumbled across something that implies that within workflows, under each job, you can specify a filter.

Except, that doesn’t seem to be working. Here’s my config:

workflows:
  version: 2
  build_and_deploy:
    jobs:
      - build:
          filters:
            branches:
              only: master

#3

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.