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

Git Plugin: No Trait for former Extension MessageExclusion

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • git-plugin
    • None
    • Jenkins 2.72
      Git Plugin 3.5.1
      Git Client Plugin 2.5.0
      SCM API Plugin 2.2.0

      Formerly we used the MessageExclusion extension ("Polling ignores commits with certain messages") to Git SCM when including a global shared pipeline library to work around JENKINS-42067 (Any commit to common library SCM repository triggers all pipeline build plans).

      There is no trait available equivalent to that extension, so we currently don't have any means to circumvent this problem anymore, which is quite a pain since we cannot use push notifications and our pipeline library is currently under heavy development.

          [JENKINS-46081] Git Plugin: No Trait for former Extension MessageExclusion

          Mark Waite added a comment -

          As far as I can tell, the "ignore push notifications" trait is available in the configuration page where the pipeline library is defined to be loaded.

          In my case, I have a Git-Client-Plugin folder which loads a pipeline library. Inside that config file there is a tag ignoreOnPushNotifications. Isn't that what you're seeking?

          Mark Waite added a comment - As far as I can tell, the "ignore push notifications" trait is available in the configuration page where the pipeline library is defined to be loaded. In my case, I have a Git-Client-Plugin folder which loads a pipeline library. Inside that config file there is a tag ignoreOnPushNotifications . Isn't that what you're seeking?

          Sascha Volkenandt added a comment - - edited

          CORRECTION: In the description I titled the extension MessageExclusion "Don't trigger a build on commit notifications". This is not correct. The correct title inside the UI is "Polling ignores commits with certain messages".

           

          I'm afraid "ignore push notifications" really only applies to push notifications, but we require to use polling since we don't have administrative access to our company-wide Git and Mercurial servers.

          There also used to be an extension "Don't trigger a build on commit notifications" (I suppose that one is the analogous extension for trait "Ignore push notifications"), which didn't work for pulling either back then.

          For now I was able to work around this by configuring Git as "Legacy SCM" instead of "Modern SCM" so I'm able to use the old extensions, but it would be nice to have such a trait (maybe on scm-api-plugin level instead of inside git-plugin) so we can drop legacy stuff at some point.

          Sascha Volkenandt added a comment - - edited CORRECTION: In the description I titled the extension MessageExclusion "Don't trigger a build on commit notifications". This is not correct. The correct title inside the UI is " Polling ignores commits with certain messages ".   I'm afraid "ignore push notifications" really only applies to push notifications, but we require to use polling since we don't have administrative access to our company-wide Git and Mercurial servers. There also used to be an extension "Don't trigger a build on commit notifications" (I suppose that one is the analogous extension for trait "Ignore push notifications"), which didn't work for pulling either back then. For now I was able to work around this by configuring Git as "Legacy SCM" instead of "Modern SCM" so I'm able to use the old extensions, but it would be nice to have such a trait (maybe on scm-api-plugin level instead of inside git-plugin) so we can drop legacy stuff at some point.

          We'd also like to have this trait to avoid extra builds triggered by a maven release. We worked around it by checking the commit message from within the logs, but it's an ugly workaround.

          I've tried creating (by imitation of other traits) a MavenReleaseExclusionTrait which uses the MessageExclusion extension, but it doesn't work.

          Carles Capdevila added a comment - We'd also like to have this trait to avoid extra builds triggered by a maven release. We worked around it by checking the commit message from within the logs, but it's an ugly workaround. I've tried creating (by imitation of other traits) a MavenReleaseExclusionTrait which uses the MessageExclusion extension, but it doesn't work.

          Chris Kilding added a comment -

          I ran into the same issue (need to observe ci skip indicators in commit messages) so I implemented the required functionality in this PR: https://github.com/jenkinsci/git-plugin/pull/727

          As I have noted in the PR comments, however, I’m not sure that the MessageExclusion class itself actually works. I couldn’t convince it to skip a commit in an example job on my local Jenkins copy.

          Chris Kilding added a comment - I ran into the same issue (need to observe ci skip indicators in commit messages) so I implemented the required functionality in this PR: https://github.com/jenkinsci/git-plugin/pull/727 As I have noted in the PR comments, however, I’m not sure that the MessageExclusion class itself actually works. I couldn’t convince it to skip a commit in an example job on my local Jenkins copy.

            Unassigned Unassigned
            lordjaxom Sascha Volkenandt
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: