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

SCM Skip plugin doesn't respect multiline commit messages

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • scmskip-plugin
    • Jenkins ver. 2.222.4
      SCM Skip v1.0.2
    • v1.0.3

      In our projects we use multi-line format commit messages when we want to skip a build:

       

      chore: Bump to version X.Y.Z
      [skip ci]
      

      The skip build step in the Jenkinsfile looks like this:

       

      stage('skip:build') {
        steps {
          // Skips a build if a commit message contains "[skip ci]"
          scmSkip(deleteBuild: true, skipPattern: '^.*\\[skip ci\\]')
        }
      }

      However, the plugin doesn't match the regexp and doesn't stop the pipeline. It looks like the plugin doesn't check against the entire commit message because in the logs I see the following:

      SCM Skip: Pattern ^.*\[skip ci\] NOT matched on message: chore: Bump to version 2.1.0
      

      I've tried to play around with different regex expressions but without luck. if I use a single-line format for the commits everything works as expected.

       

       

          [JENKINS-62751] SCM Skip plugin doesn't respect multiline commit messages

          Vadim Kadnikov created issue -
          Gregor Plavčak made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Gregor Plavčak made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Gregor Plavčak made changes -
          Released As New: v1.0.3
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]
          Gregor Plavčak made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]
          Zbynek Konecny made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Reopened [ 4 ] New: Resolved [ 5 ]

            plavc Gregor Plavčak
            terranisu Vadim Kadnikov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: