Filter specific branch merges

I’m trying to achieve the following:

  1. Run integration tests on any pull request
  2. Build and deploy to QA on merge to develop branch
  3. Build and deploy to Production on merge to master branch

I believe I have number 1 covered with the following filter:

integration-tests:
    jobs:
        - checkout:
            filters:
                branches:
                    only: /^pull\/.*$/
        # Rest of jobs

I’m not sure on how to filter for my requirements 2 and 3. Would it be like this?

deploy_qa:
    jobs:
        - checkout:
            filters:
                branches:
                    only: develop
                    ignore: /^pull\/.*$/

Or can I do it all in one regex, something like this:

deploy_qa:
    jobs:
        - checkout:
            filters:
                branches:
                    only: /^merge\/develop.*$/
1 Like

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