Branche to build:展示如下圖
如果希望跟蹤存儲庫中的某個特定分支,則需要指定分支;如果空白,將檢查所有分支,以進行更改和構建。
最安全的方法是使用refs/heads/<branchName> syntax。這樣期望的分支是明確的
如果您的分支名稱中有/,請務必使用上面的全部引用,當沒有給出完整的路徑時,插件只會使用最后一個斜杠的字符串的一部分。也就是說,foo/bar實際上是匹配的
可能的選項:
- <brancheName>
跟蹤/檢查指定的分支。如果不確定第一個結果,這並不一定是期望的結果。最好使用refs/heads/<branchName>
例如:master, feature1,...
- refs/heads/<branchName>
跟蹤/檢查指定的分支
例如:refs/heads/master, refs/heads/feature1/master,...
- <remoteRepoName>/<branchName>
最好使用refs/heads/<branchName>
例如:origin/master
- remotes/<remoteRepoName>/<branchName>
跟蹤/檢查指定的分支
例如:remotes/origin/master
- refs/remotes/<remoteRepoName>/<branchName>
例如:refs/remotes/origin/master
- <tagName>
這不起作用因為標簽不會被識別為標簽,使用refs/tags/<tagName>代替
例如:git-2.3.0
- refs/tags/<tagName>
跟蹤/檢查指定的標簽
例如:refs/tags/git-2.3.0
- <commitId>
檢查指定的提交
例如:5062ac843f2b947733e6a3b105977056821bd352, 5062ac84, ...
- ${ENV_VARIABLE}
也可以使用環境變量。在這種情況下,變量將被評估,結果將被使用,如上所述
例如:${TREEISH}, refs/tags/${TAGNAME},...
- <Wildcards>
語法的形式是:: REPOSITORYNAME/BRANCH。BRANCHE是*/BRANCHE的速寫,被認為是一個通配符
例如:origin/branches*匹配origin/branches-foo,但是不匹配origin/branches/foo
origin/branches**匹配origin/branches-foo和origin/branches/foo
- :<regular expression>
語法形式::regexp。用於構建分支的正則表達式語法只會構建那些名稱與正則表達式匹配的分支
例如:
-
- :^(?!(origin/prefix)).*
- 匹配:origin or origin/master or origin/feature
- 不匹配:origin/prefix or origin/prefix_123 or origin/prefix-ab
- :origin/release-\d{8}
- :^(?!(origin/prefix)).*
-
- 匹配:origin or origin/master or origin/feature
- 不匹配:origin/release-2015010 or origin/release-201501011 or origin/release-20150101-something
- :^(?!origin/master$|origin/develop$).*
- 匹配: origin/branch1 or origin/branch-2 or origin/master123 or origin/develop-123
- 不匹配:origin/master or origin/develop