Jenkins - 排除的提交消息 REGEX 不起作用
Jenkins - Excluded Commit Messages REGEX Not Working
在 Jenkins 中,当发现以下提交消息时,我不想触发构建 ::
[REBASE] Rebasing with the integration commit that was just made in rev.123456789
提交消息中唯一改变的是字符串末尾的数字值。
为了防止构建,我使用了作业配置页面的 "Excluded Commit Messages" 字段。在该字段中,我放置了以下 REGEX ::
/Rebasing with the integration commit that was just made in rev.\d+/
但作业仍在触发构建。
有谁知道我的 REGEX 是否有问题,或者 Jenkins 是否需要一些我不知道的 REGEX 特殊语法?
谢谢,
杰夫
您需要先删除正则表达式分隔符。
然后,一个点应该被转义,因为它是一个特殊的正则表达式字符,意思是 除换行符之外的任何符号。
因此,您需要使用
Rebasing with the integration commit that was just made in rev\.\d+
在 Jenkins 中,当发现以下提交消息时,我不想触发构建 ::
[REBASE] Rebasing with the integration commit that was just made in rev.123456789
提交消息中唯一改变的是字符串末尾的数字值。
为了防止构建,我使用了作业配置页面的 "Excluded Commit Messages" 字段。在该字段中,我放置了以下 REGEX ::
/Rebasing with the integration commit that was just made in rev.\d+/
但作业仍在触发构建。
有谁知道我的 REGEX 是否有问题,或者 Jenkins 是否需要一些我不知道的 REGEX 特殊语法?
谢谢,
杰夫
您需要先删除正则表达式分隔符。
然后,一个点应该被转义,因为它是一个特殊的正则表达式字符,意思是 除换行符之外的任何符号。
因此,您需要使用
Rebasing with the integration commit that was just made in rev\.\d+