Help with filtering rules


#1

I have the following workflow config:

workflows:
  version: 2
  deployment:
    jobs:
      - test
      - staging_approval:
          type: approval
          requires:
            - test
          filters:
            branches:
              only: master
      - staging:
          requires:
            - staging_approval
      - production_approval:
          type: approval
          requires:
            - staging
      - production:
          requires:
            - production_approval

The current behavior is:

  • The test step runs for every commit in every branch.
  • The staging_approval and the following steps only run for the master branch.

I want to achieve the following:

  • The test step runs for every commit in every branch, except for the master branch.
  • The staging_approval and the following steps only run for the master branch.

I can’t find a way to achieve that using filters, as one filter would conflict with the other one. Can anyone help me figuring out?


#2

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