【问题标题】:Jenkins Naginator plugin and regexJenkins Naginator 插件和正则表达式
【发布时间】:2018-10-13 20:57:42
【问题描述】:

有没有人设法让 Jenkins Naginator 插件使用正则表达式?

我有控制台输出

Build was aborted
Aborted by xxxxxxxxx
[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at BUILD level C:\xxxxxxxxx\workspace\testSuiteExecution\target\surefire-reports to /var/lib/jenkins/jobs/testSuiteExecution/builds/534/htmlreports/HTML_Report
ERROR: Specified HTML directory 'C:\xxxxxx\workspace\testSuiteExecution\target\surefire-reports' does not exist.
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in 0 seconds
Notifying upstream projects of job completion
Finished: ABORTED

我使用 naginator 插件仅在它被中止的情况下重建以前的构建。 因此我提出:

但这不起作用。我尝试了许多正则表达式变体(例如,构建被中止),但没有运气。 有没有人设法让它工作?

您是否有任何替代方法可以仅重新运行已中止的构建(未失败、成功或不稳定)

【问题讨论】:

    标签: jenkins jenkins-plugins


    【解决方案1】:

    跳过斜线。 “正则表达式”应该在这种情况下:

    Build was aborted
    

    您可以添加 OR 条件

    ||
    

    举个例子:

    ERROR: Error fetching remote repo 'origin' || .OutOfMemoryError 
    

    【讨论】:

      【解决方案2】:

      语法已更改。 目前正确的是:

      first phrase|any second phrase|third text
      

      重点:符号“|”附近没有空格。

      这个例子:

      first phrase | any text
      

      表示搜索“第一个短语”或“任何文本”的出现。

      另外,经过大量实验,我没有找到带有“*”的通配符的正确语法,因此它不像正则表达式。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2014-01-13
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-07-01
        • 1970-01-01
        相关资源
        最近更新 更多