• Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • None
    • Jenkins 2.150.2
      branch-api-plugin 2.1.0
      Pipeline Multibranch Plugin 2.20

      Jenkins 2.150.3
      branch-api-plugin 2.1.2
      Pipeline Multibranch Plugin 2.20

      I am using multibranch pipeline job.

      After few upgrades, I've noticed that Property strategy -> Suppress automatic SCM triggering is shown as deprecated in existing jobs and I can't add it to new jobs.

      Tested on different Jenkins instances with current / latest versions, still the same.

      Not sure which plugin caused this change, so happy to add more info if needed.

          [JENKINS-56231] Suppress automatic SCM triggering is deprecated

          The deprecation is part of JENKINS-47859

          The JavaDoc of the class `NoTriggerBranchProperty` says:

          @deprecated Replaced by a named branch build strategy in the <code>basic-branch-build-strategies</code> plugin

           

          Christian Ciach added a comment - The deprecation is part of JENKINS-47859 The JavaDoc of the class `NoTriggerBranchProperty` says: @deprecated Replaced by a named branch build strategy in the <code>basic-branch-build-strategies</code> plugin  

          Oleg Maki added a comment -

          Could you please provide some sample how "Suppress automatic SCM triggering" could be achieved with "named branch build strategy"

          Oleg Maki added a comment - Could you please provide some sample how "Suppress automatic SCM triggering" could be achieved with "named branch build strategy"

          Not sure which plugin caused this change, so happy to add more info if needed.

          Installation of plugin "Basic Branch Build Strategies" removes the property "Suppress automatic SCM triggering".

          What is the alternative to deprecated property "Suppress automatic SCM triggering"?!

          Mykola Ulianytskyi added a comment - Not sure which plugin caused this change, so happy to add more info if needed. Installation of plugin "Basic Branch Build Strategies" removes the property "Suppress automatic SCM triggering". What is the alternative to deprecated property "Suppress automatic SCM triggering"?!

          I think the idea is to use Build Strategy -> Named branches -> Wildcard include/exclude -> Excludes *, that seem to be working for me

          Grigory Netsman added a comment - I think the idea is to use Build Strategy -> Named branches -> Wildcard include/exclude -> Excludes *, that seem to be working for me

          Thank you, gnetsman

          It works for me too.

          P.S. I excluded all branches in build strategy and tested pollSCM trigger in pipeline.

          Result: Polling works even if branch was excluded. Good

          Mykola Ulianytskyi added a comment - Thank you, gnetsman It works for me too. P.S. I excluded all branches in build strategy and tested pollSCM trigger in pipeline. Result: Polling works even if branch was excluded. Good

          Esaad Afaque added a comment -

          I have noticed the same on my end too. Compared it to and older version of the Branch API plugin (2.0.20) and it had this option. 

          This is a bummer because my team has been heavily reliant on this feature. 

          Esaad Afaque added a comment - I have noticed the same on my end too. Compared it to and older version of the Branch API plugin ( 2.0.20 ) and it had this option.  This is a bummer because my team has been heavily reliant on this feature. 

          Esaad Afaque added a comment -

          > Installation of plugin "Basic Branch Build Strategies" removes the property "Suppress automatic SCM triggering".

           

          This helped me. All I had to do was disable the plugin and the Suppress option came back again. 

          Esaad Afaque added a comment - > Installation of plugin "Basic Branch Build Strategies" removes the property "Suppress automatic SCM triggering".   This helped me. All I had to do was disable the plugin and the Suppress option came back again. 

          I know that the option is deprecated, however I am sorta stuck. We are using Github Organization type jobs and are trying to run "master" branch builds nightly instead of continually. I see no clean way to implement this with the current API. 

          I have opened https://issues.jenkins-ci.org/browse/JENKINS-55519 in January for this. 

          Gennady Feldman added a comment - I know that the option is deprecated, however I am sorta stuck. We are using Github Organization type jobs and are trying to run "master" branch builds nightly instead of continually. I see no clean way to implement this with the current API.  I have opened  https://issues.jenkins-ci.org/browse/JENKINS-55519  in January for this. 

          Even I am facing similar issue. I have disabled GitHub WebHook that points to Jenkins Server because I want GitHub WebHook to point to a Lambda function. My lambda function filters Webhooks events and only when a specific comment is made on a PR I want to trigger a build on Jenkins. Unfortunately, after disabling the Webhook that points to jenkins directly, PR branches aren't being discovered and hence I am unable to trigger build on PR branches. I can resolve this problem by re-enabling the GitHub WebHook that points to Jenkins Server but disabling "Suppress automatic SCM triggering". Unfortunately I can't find that anymore on Jenkins Configure due to updates. How should I go about? I want Jenkins to discover branches but not trigger builds on its own.

          Chaitanya Bapat added a comment - Even I am facing similar issue. I have disabled GitHub WebHook that points to Jenkins Server because I want GitHub WebHook to point to a Lambda function. My lambda function filters Webhooks events and only when a specific comment is made on a PR I want to trigger a build on Jenkins. Unfortunately, after disabling the Webhook that points to jenkins directly, PR branches aren't being discovered and hence I am unable to trigger build on PR branches. I can resolve this problem by re-enabling the GitHub WebHook that points to Jenkins Server but disabling "Suppress automatic SCM triggering". Unfortunately I can't find that anymore on Jenkins Configure due to updates. How should I go about? I want Jenkins to discover branches but not trigger builds on its own.

          p cowlinator added a comment - - edited

          Installation of plugin "Basic Branch Build Strategies" removes the property "Suppress automatic SCM triggering".

          Ok... but I don't have the "Basic Branch Build Strategies" installed (and never have), and I still see "(Deprecated) Suppress automatic SCM triggering".

          Why am I seeing this?  What is the alternative?

          EDIT: after some testing, it seems that this property seems to correctly suppress triggering from branch indexing, despite being marked as "deprecated".  Not ideal, but it works.  (Have not tested it with SCM changes.)  Your mileage may vary.

          p cowlinator added a comment - - edited Installation of plugin "Basic Branch Build Strategies" removes the property "Suppress automatic SCM triggering". Ok... but I don't have the "Basic Branch Build Strategies" installed (and never have), and I still see "(Deprecated) Suppress automatic SCM triggering". Why am I seeing this?  What is the alternative? EDIT: after some testing, it seems that this property seems to correctly suppress triggering from branch indexing, despite being marked as "deprecated".  Not ideal, but it works.  (Have not tested it with SCM changes.)  Your mileage may vary.

            Unassigned Unassigned
            gnetsman Grigory Netsman
            Votes:
            3 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: