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

Option to suppress automatic SCM trigger

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      There should be an option to create branch projects automatically wherever a Jenkinsfile is detected, yet suppress the automatic SCM trigger which fires when branch indexing detects a new branch head. Manual or other automatic scheduled builds should still be possible.

      Needs to be supported as a configuration option at least at the level of a single multibranch project, or an organization folder. TBD whether there is a need to reinstate the built-in SCM trigger for certain branches, certain repos, etc.

        Attachments

          Issue Links

            Activity

            owood Owen Wood created issue -
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Labels multibranch
            jglick Jesse Glick made changes -
            Summary Add option to ignore JENKINSFILE Add option to suppress automatic SCM trigger
            owood Owen Wood made changes -
            Description {quote}
            Suppose I have a repo in the organization with Jenkinsfile that I do NOT want the pipeline to be automatically triggered. Is there any option to disable the default behavior of automated trigger?
            {quote}
            Add option to ignore Jenkinsfile from repo
            Labels multibranch
            Summary Add option to suppress automatic SCM trigger Add option to ignore JENKINSFILE
            recena Manuel Recena Soto made changes -
            Description Add option to ignore Jenkinsfile from repo Add option to ignore {{Jenkinsfile}} from repository.
            jglick Jesse Glick made changes -
            Resolution Incomplete [ 4 ]
            Status Open [ 1 ] Resolved [ 5 ]
            jglick Jesse Glick made changes -
            Comment [ Request has yet to be clarified. ]
            jglick Jesse Glick made changes -
            Description Add option to ignore {{Jenkinsfile}} from repository. There should be an option to create branch projects automatically wherever a {{Jenkinsfile}} is detected, yet suppress the automatic SCM trigger which fires when branch indexing detects a new branch head. Manual or other automatic scheduled builds should still be possible.

            Needs to be supported as a configuration option at least at the level of a single multibranch project, or an organization folder. TBD whether there is a need to reinstate the built-in SCM trigger for certain branches, certain repos, etc.
            Priority Minor [ 4 ] Major [ 3 ]
            Summary Add option to ignore JENKINSFILE Option to suppress automatic SCM trigger
            owood Owen Wood made changes -
            Comment [ From customer:

            {quote}
            Assuming Github organization webhook is properly configured, any submissions to a repo that contains Jenkinsfile will automatically trigger the workflow pipeline.
            Suppose I have a repo in the organization with Jenkinsfile that I do NOT want the pipeline to be automatically triggered. Is there any option to disable the default behavior of automated trigger?
            {quote} ]
            jglick Jesse Glick made changes -
            Resolution Incomplete [ 4 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            jglick Jesse Glick made changes -
            Status Reopened [ 4 ] Open [ 1 ]
            Hide
            jglick Jesse Glick added a comment -

            Also probably the initial build #1 should not be automatically scheduled with this option enabled, though that can cause problems when you want to have an automatic trigger set up via the properties step—without the initial build, there will be no job properties, preventing a declarative trigger from being “bootstrapped”. Various implications need to be studied.

            Show
            jglick Jesse Glick added a comment - Also probably the initial build #1 should not be automatically scheduled with this option enabled, though that can cause problems when you want to have an automatic trigger set up via the properties step—without the initial build, there will be no job properties, preventing a declarative trigger from being “bootstrapped”. Various implications need to be studied.
            jglick Jesse Glick made changes -
            Labels multibranch
            Hide
            choih Hyung Choi added a comment - - edited

            the initial build #1 should not be automatically scheduled with this option enabled

            I agree. We are looking for this option as well.

            We'd like flexible trigger option to be easily configurable in Jenkinsfile.

            Show
            choih Hyung Choi added a comment - - edited the initial build #1 should not be automatically scheduled with this option enabled I agree. We are looking for this option as well. We'd like flexible trigger option to be easily configurable in Jenkinsfile.
            hrmpw Patrick Wolf made changes -
            Labels multibranch 2.0 multibranch
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-34005 [ JENKINS-34005 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-33909 [ JENKINS-33909 ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-22242 [ JENKINS-22242 ]
            Hide
            jglick Jesse Glick added a comment -

            PR 1 offered something similar, though it is very outdated and would need to be reworked to support organization folders.

            Show
            jglick Jesse Glick added a comment - PR 1 offered something similar, though it is very outdated and would need to be reworked to support organization folders.
            jglick Jesse Glick made changes -
            Remote Link This issue links to "PR 1 (Web Link)" [ 14297 ]
            jglick Jesse Glick made changes -
            Component/s branch-api-plugin [ 18621 ]
            Labels 2.0 multibranch
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-22242 [ JENKINS-22242 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "PR 43 (Web Link)" [ 14306 ]
            jglick Jesse Glick made changes -
            Link This issue depends on JENKINS-30206 [ JENKINS-30206 ]
            Hide
            jglick Jesse Glick added a comment -

            Released as 1.9-beta-1.

            Show
            jglick Jesse Glick added a comment - Released as 1.9-beta-1.
            jglick Jesse Glick made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/main/java/jenkins/branch/BranchProperty.java
            src/main/java/jenkins/branch/NoTriggerBranchProperty.java
            src/main/java/jenkins/branch/NoTriggerOrganizationFolderProperty.java
            src/main/java/jenkins/branch/OrganizationFolder.java
            src/main/resources/jenkins/branch/Messages.properties
            src/main/resources/jenkins/branch/NoTriggerBranchProperty/config.jelly
            src/main/resources/jenkins/branch/NoTriggerBranchProperty/help.html
            src/main/resources/jenkins/branch/NoTriggerOrganizationFolderProperty/config.jelly
            src/main/resources/jenkins/branch/NoTriggerOrganizationFolderProperty/help-branches.html
            src/main/resources/jenkins/branch/harness/BranchProjectFactoryImpl/config.jelly
            src/test/java/jenkins/branch/NoTriggerBranchPropertyTest.java
            src/test/java/jenkins/branch/NoTriggerOrganizationFolderPropertyTest.java
            src/test/java/jenkins/branch/harness/BranchProjectFactoryImpl.java
            src/test/java/jenkins/branch/harness/MultiBranchImpl.java
            http://jenkins-ci.org/commit/branch-api-plugin/9468926111de0efcb5ecad4b4d66e6710a795008
            Log:
            [FIXED JENKINS-32396] Option to suppress automatic SCM trigger.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/jenkins/branch/BranchProperty.java src/main/java/jenkins/branch/NoTriggerBranchProperty.java src/main/java/jenkins/branch/NoTriggerOrganizationFolderProperty.java src/main/java/jenkins/branch/OrganizationFolder.java src/main/resources/jenkins/branch/Messages.properties src/main/resources/jenkins/branch/NoTriggerBranchProperty/config.jelly src/main/resources/jenkins/branch/NoTriggerBranchProperty/help.html src/main/resources/jenkins/branch/NoTriggerOrganizationFolderProperty/config.jelly src/main/resources/jenkins/branch/NoTriggerOrganizationFolderProperty/help-branches.html src/main/resources/jenkins/branch/harness/BranchProjectFactoryImpl/config.jelly src/test/java/jenkins/branch/NoTriggerBranchPropertyTest.java src/test/java/jenkins/branch/NoTriggerOrganizationFolderPropertyTest.java src/test/java/jenkins/branch/harness/BranchProjectFactoryImpl.java src/test/java/jenkins/branch/harness/MultiBranchImpl.java http://jenkins-ci.org/commit/branch-api-plugin/9468926111de0efcb5ecad4b4d66e6710a795008 Log: [FIXED JENKINS-32396] Option to suppress automatic SCM trigger.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/main/java/jenkins/branch/BranchIndexingCause.java
            src/main/java/jenkins/branch/BranchProperty.java
            src/main/java/jenkins/branch/NoTriggerBranchProperty.java
            src/main/java/jenkins/branch/NoTriggerOrganizationFolderProperty.java
            src/main/java/jenkins/branch/OrganizationFolder.java
            src/main/resources/jenkins/branch/Messages.properties
            src/main/resources/jenkins/branch/NoTriggerBranchProperty/config.jelly
            src/main/resources/jenkins/branch/NoTriggerBranchProperty/help.html
            src/main/resources/jenkins/branch/NoTriggerOrganizationFolderProperty/config.jelly
            src/main/resources/jenkins/branch/NoTriggerOrganizationFolderProperty/help-branches.html
            src/main/resources/jenkins/branch/harness/BranchProjectFactoryImpl/config.jelly
            src/test/java/jenkins/branch/NoTriggerBranchPropertyTest.java
            src/test/java/jenkins/branch/NoTriggerOrganizationFolderPropertyTest.java
            src/test/java/jenkins/branch/harness/BranchProjectFactoryImpl.java
            src/test/java/jenkins/branch/harness/MultiBranchImpl.java
            http://jenkins-ci.org/commit/branch-api-plugin/b02297b7ba5c01d40403540badb40b6087ff2394
            Log:
            Merge pull request #43 from jglick/NoTriggerBranchProperty-JENKINS-32396

            JENKINS-32396 Option to suppress automatic SCM trigger

            Compare: https://github.com/jenkinsci/branch-api-plugin/compare/0400b7dbb8dd...b02297b7ba5c

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/jenkins/branch/BranchIndexingCause.java src/main/java/jenkins/branch/BranchProperty.java src/main/java/jenkins/branch/NoTriggerBranchProperty.java src/main/java/jenkins/branch/NoTriggerOrganizationFolderProperty.java src/main/java/jenkins/branch/OrganizationFolder.java src/main/resources/jenkins/branch/Messages.properties src/main/resources/jenkins/branch/NoTriggerBranchProperty/config.jelly src/main/resources/jenkins/branch/NoTriggerBranchProperty/help.html src/main/resources/jenkins/branch/NoTriggerOrganizationFolderProperty/config.jelly src/main/resources/jenkins/branch/NoTriggerOrganizationFolderProperty/help-branches.html src/main/resources/jenkins/branch/harness/BranchProjectFactoryImpl/config.jelly src/test/java/jenkins/branch/NoTriggerBranchPropertyTest.java src/test/java/jenkins/branch/NoTriggerOrganizationFolderPropertyTest.java src/test/java/jenkins/branch/harness/BranchProjectFactoryImpl.java src/test/java/jenkins/branch/harness/MultiBranchImpl.java http://jenkins-ci.org/commit/branch-api-plugin/b02297b7ba5c01d40403540badb40b6087ff2394 Log: Merge pull request #43 from jglick/NoTriggerBranchProperty- JENKINS-32396 JENKINS-32396 Option to suppress automatic SCM trigger Compare: https://github.com/jenkinsci/branch-api-plugin/compare/0400b7dbb8dd...b02297b7ba5c
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/test/java/org/jenkinsci/plugins/workflow/multibranch/NoTriggerBranchPropertyWorkflowTest.java
            http://jenkins-ci.org/commit/workflow-multibranch-plugin/882717d567e255d32547aa7a551016c0b1786fd7
            Log:
            JENKINS-32396 Integration test for NoTriggerBranchProperty and NoTriggerOrganizationFolderProperty.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/test/java/org/jenkinsci/plugins/workflow/multibranch/NoTriggerBranchPropertyWorkflowTest.java http://jenkins-ci.org/commit/workflow-multibranch-plugin/882717d567e255d32547aa7a551016c0b1786fd7 Log: JENKINS-32396 Integration test for NoTriggerBranchProperty and NoTriggerOrganizationFolderProperty.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/test/java/org/jenkinsci/plugins/workflow/multibranch/WorkflowMultiBranchProjectTest.java
            http://jenkins-ci.org/commit/workflow-multibranch-plugin/4e5b39efc03ff86836aa09f09a444fabc8c523d4
            Log:
            As of JENKINS-32396, JENKINS-32670 is irrelevant since we do have a legitimate BranchProperty.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/test/java/org/jenkinsci/plugins/workflow/multibranch/WorkflowMultiBranchProjectTest.java http://jenkins-ci.org/commit/workflow-multibranch-plugin/4e5b39efc03ff86836aa09f09a444fabc8c523d4 Log: As of JENKINS-32396 , JENKINS-32670 is irrelevant since we do have a legitimate BranchProperty.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/workflow/multibranch/WorkflowBranchProjectFactory.java
            src/test/java/org/jenkinsci/plugins/workflow/multibranch/JobPropertyStepTest.java
            src/test/java/org/jenkinsci/plugins/workflow/multibranch/NoTriggerBranchPropertyWorkflowTest.java
            src/test/java/org/jenkinsci/plugins/workflow/multibranch/WorkflowMultiBranchProjectTest.java
            http://jenkins-ci.org/commit/workflow-multibranch-plugin/5574409ef9334fb1774137627fe73f60174da515
            Log:
            Merge pull request #12 from jglick/update-no-trigger-JENKINS-32396-JENKINS-30206

            JENKINS-30206 JENKINS-32396 Honor changes to NoTriggerBranchProperty

            Compare: https://github.com/jenkinsci/workflow-multibranch-plugin/compare/eb538b808ee8...5574409ef933

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/org/jenkinsci/plugins/workflow/multibranch/WorkflowBranchProjectFactory.java src/test/java/org/jenkinsci/plugins/workflow/multibranch/JobPropertyStepTest.java src/test/java/org/jenkinsci/plugins/workflow/multibranch/NoTriggerBranchPropertyWorkflowTest.java src/test/java/org/jenkinsci/plugins/workflow/multibranch/WorkflowMultiBranchProjectTest.java http://jenkins-ci.org/commit/workflow-multibranch-plugin/5574409ef9334fb1774137627fe73f60174da515 Log: Merge pull request #12 from jglick/update-no-trigger- JENKINS-32396 - JENKINS-30206 JENKINS-30206 JENKINS-32396 Honor changes to NoTriggerBranchProperty Compare: https://github.com/jenkinsci/workflow-multibranch-plugin/compare/eb538b808ee8...5574409ef933
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-34725 [ JENKINS-34725 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 168017 ] JNJira + In-Review [ 198330 ]
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-37220 [ JENKINS-37220 ]
            abayer Andrew Bayer made changes -
            Component/s pipeline-general [ 21692 ]
            abayer Andrew Bayer made changes -
            Component/s workflow-plugin [ 18820 ]
            schneidexe Thomas Schneider made changes -
            Link This issue relates to JENKINS-45814 [ JENKINS-45814 ]
            Hide
            arnaudeprez Arnaud Deprez added a comment -

            Hi,

            I don't think this issue is actually fixed.
            See my comment: https://github.com/jenkinsci/branch-api-plugin/pull/43#issuecomment-422763236

            Can we reopen it ?

            Show
            arnaudeprez Arnaud Deprez added a comment - Hi, I don't think this issue is actually fixed. See my comment: https://github.com/jenkinsci/branch-api-plugin/pull/43#issuecomment-422763236 Can we reopen it ?
            mcascone Max Cascone made changes -
            Link This issue is related to JENKINS-64896 [ JENKINS-64896 ]

              People

              Assignee:
              jglick Jesse Glick
              Reporter:
              owood Owen Wood
              Votes:
              6 Vote for this issue
              Watchers:
              18 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: