Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-13823

Allow regular expressions for branch matching

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      Branch matching with glob patterns is not sufficient. We end up having to write out the same code multiple times to cover all of our branches. Moving this into a script is an option, but there is a lot of value in keeping these configurations simple and all in one file.

      Here is an example pipelines file with this issue:

      #!yaml
      
      image: phpunit/phpunit:5.0.3
      clone:
        depth: 1
      pipelines:
        branches:
          master:
            - step:
                script:
                  - do something
                  - do something else
                  - do something else
          develop:
            - step:
                script:
                  - do something
                  - do something else
                  - do something else
          release/*:
            - step:
                script:
                  - do something
                  - do something else
                  - do something else
      

      And the same script with regular expressions:

      #!yaml
      
      image: phpunit/phpunit:5.0.3
      clone:
        depth: 1
      pipelines:
        branches:
          ~ ^develop|master|release/.*$:
            - step:
                script:
                  - do something
                  - do something else
                  - do something else
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            afa78375b658 Kirk Madera
            Votes:
            13 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated: