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

Build Periodically setting for multibranch pipelines needs clarification

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Labels:
    • Environment:
      O.S.: Ubuntu 15.04 (Vivid)
      Jenkins Version: 2.32.1 LTS
      SCM-API 2.0.1-beta-1
      JDK version: OpenJDK Runtime Environment (build 1.8.0_45-internal-b14)
    • Similar Issues:

      Description

      Setting the "Build Periodically" setting for a multibranch pipeline job implies that the job will be run at that interval. But the setting is intended to trigger periodic rescans of the repo, not periodic builds.

      The inline documentation implies that the build will be run periodically, as opposed to the branch indexing. This is misleading:

      Provides a cron-like feature to periodically execute this project.
      This feature is primarily for using Jenkins as a cron replacement, and it is not ideal for continuously building software projects. When people first start continuous integration, they are often so used to the idea of regularly scheduled builds like nightly/weekly that they use this feature. However, the point of continuous integration is to start a build as soon as a change is made, to provide a quick feedback to the change. To do that you need to hook up SCM change notification to Jenkins.
      So, before using this feature, stop and ask yourself if this is really what you want.

        Attachments

          Activity

          Hide
          macwinnie Martin Winter added a comment -

          May I ask, why the mentioned solution – to remove the option – was the chosen one?

          My use-case would be to run the build of some multibranch projects every x hours. The Job is to build multiple versions of docker images of one tool based on their base image. The base image could have changed while the relevant SCM source did not and so the multibranch pipeline does not fit my needs. Or did I miss sth?

          Thank you!

          Show
          macwinnie Martin Winter added a comment - May I ask, why the mentioned solution – to remove the option – was the chosen one? My use-case would be to run the build of some multibranch projects every x hours. The Job is to build multiple versions of docker images of one tool based on their base image. The base image could have changed while the relevant SCM source did not and so the multibranch pipeline does not fit my needs. Or did I miss sth? Thank you!
          Hide
          stephenconnolly Stephen Connolly added a comment -

          cloudbees-folders 6.0.0

          Show
          stephenconnolly Stephen Connolly added a comment - cloudbees-folders 6.0.0
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          src/main/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolder.java
          src/main/resources/com/cloudbees/hudson/plugins/folder/computed/ComputedFolder/configure-details.jelly
          src/main/resources/com/cloudbees/hudson/plugins/folder/computed/ComputedFolder/configure-details.properties
          src/main/resources/com/cloudbees/hudson/plugins/folder/computed/Messages.properties
          src/test/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolderTest.java
          http://jenkins-ci.org/commit/cloudbees-folder-plugin/0d35973205f9bf79eee02ba36dc380f02b6ecc0a
          Log:
          Merge pull request #89 from stephenc/jenkins-40921

          [FIXED JENKINS-40921][FIXED JENKINS-33020] Only display triggers that make sense for a folder computation

          Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/ea44cb643427...0d35973205f9

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolder.java src/main/resources/com/cloudbees/hudson/plugins/folder/computed/ComputedFolder/configure-details.jelly src/main/resources/com/cloudbees/hudson/plugins/folder/computed/ComputedFolder/configure-details.properties src/main/resources/com/cloudbees/hudson/plugins/folder/computed/Messages.properties src/test/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolderTest.java http://jenkins-ci.org/commit/cloudbees-folder-plugin/0d35973205f9bf79eee02ba36dc380f02b6ecc0a Log: Merge pull request #89 from stephenc/jenkins-40921 [FIXED JENKINS-40921] [FIXED JENKINS-33020] Only display triggers that make sense for a folder computation Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/ea44cb643427...0d35973205f9
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          src/main/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolder.java
          http://jenkins-ci.org/commit/cloudbees-folder-plugin/e6ea7d8ceebcc0a95eda7159c402a9d0e01b309b
          Log:
          JENKINS-40921 Review comments

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolder.java http://jenkins-ci.org/commit/cloudbees-folder-plugin/e6ea7d8ceebcc0a95eda7159c402a9d0e01b309b Log: JENKINS-40921 Review comments
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          src/test/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolderTest.java
          http://jenkins-ci.org/commit/cloudbees-folder-plugin/e72a89e4964458ed51a9d0f7d30e8616c750ae95
          Log:
          JENKINS-40921 Add test to verify configuration page for triggers works

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/test/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolderTest.java http://jenkins-ci.org/commit/cloudbees-folder-plugin/e72a89e4964458ed51a9d0f7d30e8616c750ae95 Log: JENKINS-40921 Add test to verify configuration page for triggers works
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          src/main/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolder.java
          src/main/resources/com/cloudbees/hudson/plugins/folder/computed/ComputedFolder/configure-details.jelly
          src/main/resources/com/cloudbees/hudson/plugins/folder/computed/ComputedFolder/configure-details.properties
          src/main/resources/com/cloudbees/hudson/plugins/folder/computed/Messages.properties
          http://jenkins-ci.org/commit/cloudbees-folder-plugin/9c378bea8901a0fddd0bdcea0783b98dae7d1078
          Log:
          [FIXED JENKINS-40921][FIXED JENKINS-33020] Only display triggers that make sense for a folder computation

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/com/cloudbees/hudson/plugins/folder/computed/ComputedFolder.java src/main/resources/com/cloudbees/hudson/plugins/folder/computed/ComputedFolder/configure-details.jelly src/main/resources/com/cloudbees/hudson/plugins/folder/computed/ComputedFolder/configure-details.properties src/main/resources/com/cloudbees/hudson/plugins/folder/computed/Messages.properties http://jenkins-ci.org/commit/cloudbees-folder-plugin/9c378bea8901a0fddd0bdcea0783b98dae7d1078 Log: [FIXED JENKINS-40921] [FIXED JENKINS-33020] Only display triggers that make sense for a folder computation
          Hide
          stephenconnolly Stephen Connolly added a comment -

          I think the fix for this is to remove "Build Periodically" as an option. For computed folders the recommended option is "Periodically if not otherwise run"

          Show
          stephenconnolly Stephen Connolly added a comment - I think the fix for this is to remove "Build Periodically" as an option. For computed folders the recommended option is "Periodically if not otherwise run"

            People

            • Assignee:
              stephenconnolly Stephen Connolly
              Reporter:
              kshultz Karl Shultz
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: