Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-57234

scmSkip skipPattern doesn't work as advertised

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • scmskip-plugin
    • None
    • Jenkins LTS 2.164.2 and all latest plugins
      SCM Skip 1.0.0

      I want to allow the words 'ci' and 'skip' in either order. If my declarative Jenkinsfile has, as per the suggestion in the wiki:

      scmSkip(deleteBuild: true, skipPattern: '.*\[(ci skip|skip ci)\].*')
      

      then the Jenkinsfile validator yields:

      Errors encountered validating Jenkinsfile:
      WorkflowScript: 135: unexpected char: '\' @ line 135, column 52.
         eBuild: true, skipPattern: '.*\[(ci skip
                                       ^
      

      and if I double-escape like this:

      scmSkip(deleteBuild: true, skipPattern: '.*\\[(ci skip|skip ci)\\].*')
      

      then my Jenkinsfile validates properly, but the build output suggests my configuration had no effect:

      SCM Skip: Pattern .*\[ci skip\].* NOT matched on message: Preparing for version 15.5.A2, build 05315. [skip ci]
      

            plavc Gregor PlavĨak
            bryceman Bryce Schober
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: