Jenkins - 排除的提交消息REGEX不起作用

时间:2015-09-23 20:24:30

标签: regex jenkins continuous-integration

在Jenkins,我有一份工作,我不希望在找到以下提交消息时触发构建::

[REBASE] Rebasing with the integration commit that was just made in rev.123456789

提交消息中唯一改变的是字符串末尾的数字值。

为防止构建,我使用"排除的提交消息"作业配置页面的字段。在该字段中,我放置了以下REGEX ::

/Rebasing with the integration commit that was just made in rev.\d+/

enter image description here

但是这项工作仍在触发构建。

有没有人知道我的REGEX可能不好,或者Jenkins是否需要一些我不了解的REGEX特殊语法?

谢谢,

杰夫

1 个答案:

答案 0 :(得分:1)

您需要先删除正则表达式分隔符。

然后,一个点应该被转义,因为它是一个特殊的正则表达式字符,意思是任何符号,但是换行符

因此,您需要使用

Rebasing with the integration commit that was just made in rev\.\d+