How to use regex pattern to match the branch name in Bamboo Data center

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

要約

The purpose of this KB is to provide few examples on how to use the regex pattern matching in Bamboo for matching the branch names. 

環境

This has been tested on Bamboo 9.6.4 but the solution will work for other supported version of Bamboo. 

ソリューション

  1. One of the use cases of regex is to match the branch name as a variable in Bamboo, please see the example below ( here we are matching the branch name which starts with issue keyword )
^.*issue.*

          

      2. Another possible use case is during the creation of plan branches in Bamboo ( here we are creating a new branch in Bamboo when the source repository branch matches the keyword starting with text pssrv )

         

3. If there are multiple branches for which the regex needs to be matched, then you can use the below

^production.*|^main.*

(info) Here branches have name starting with production and main


Please refer below 2 pages for generic syntax for regex matching

パターン マッチング リファレンス

Oracle regex pattern matching


最終更新日 2024 年 9 月 5 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.