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

phaseJobs() are being skipped when there are no changes.

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • multijob-plugin
    • Jenkins: 1.625.2
      MultiJob-Plugin: 1.19

      With version 1.19, jobs are being skipped with the message: Job status: [gerrit-master-FooApp-Assets] subjob has no changes since last build.

      I expected all jobs to be built, regardless of whether there are changes or not.

      With version 1.18, these jobs are build built regardless of the changes in SCM with the message: Job status: [gerrit-master-FooApp-Assets] the 'build only if scm changes' feature is disabled.

      I tried reading through the commits to find the problem and I suspect it is commit 170e19a30b422cd445334edd29918277da298eb7 Fix JENKINS-30906 -> Restore build on scm changes logic

      I think the change made there for phaseConfig.isBuildOnlyIfSCMChanges() should be wrapping the SCM changes at the end and a new StatusJob should be created to replace the old BUILD_ONLY_IF_SCM_CHANGES_DISABLED.

      As it is, that commit is totally changing the flow of that method.

          [JENKINS-31579] phaseJobs() are being skipped when there are no changes.

          Christian Höltje created issue -
          Kirill Merkushev made changes -
          Link New: This issue is blocking JENKINS-31580 [ JENKINS-31580 ]

          Also setting checkbox "Build only if SCM changes" to true, will make multijob phase run even if no changes were found. Looks like some one reverted value. (it must skip phase when this checkbox is active and no changes made, and build when it is disabled whenever changes are presented, – but in 1.19 it does completely opposite).

          Dmitriy Belyaev added a comment - Also setting checkbox "Build only if SCM changes" to true, will make multijob phase run even if no changes were found. Looks like some one reverted value. (it must skip phase when this checkbox is active and no changes made, and build when it is disabled whenever changes are presented, – but in 1.19 it does completely opposite).
          Ing. Christoph Obexer made changes -
          Assignee New: hagzag [ hagzag ]

          the javadoc at https://github.com/jenkinsci/tikal-multijob-plugin/blob/master/src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobBuilder.java#L132 is also wrong.

          Also I don't think this should skip Jobs that don't have an SCM at all: Regardless of the configuration of the "Build only if SCM changes" checkbox a Job without an SCM will never have changes, will it?

          Ing. Christoph Obexer added a comment - the javadoc at https://github.com/jenkinsci/tikal-multijob-plugin/blob/master/src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobBuilder.java#L132 is also wrong. Also I don't think this should skip Jobs that don't have an SCM at all: Regardless of the configuration of the "Build only if SCM changes" checkbox a Job without an SCM will never have changes, will it?

          This has also affected our builds... Looks like subjobs are being skipped when they shouldn't be

          Ebrahim Moshaya added a comment - This has also affected our builds... Looks like subjobs are being skipped when they shouldn't be
          hagzag made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Seems to be fixed by https://github.com/jenkinsci/tikal-multijob-plugin/commit/9ca4518726d7fdb52042f6a2fb8fee4a5a0809c6
          Only the release notes for 1.20 (and 119) are missing.

          Daniel Geißler added a comment - Seems to be fixed by https://github.com/jenkinsci/tikal-multijob-plugin/commit/9ca4518726d7fdb52042f6a2fb8fee4a5a0809c6 Only the release notes for 1.20 (and 119) are missing.

          Vladimiro Sa added a comment - - edited

          The problem seems to be under these lines:

          MultiJobBuilder.java (line 155)

              if ( !phaseConfig.isBuildOnlyIfSCMChanges() ){
                      return StatusJob.BUILD_ONLY_IF_SCM_CHANGES_DISABLED;
                  }
          

          According to the description "I expected all jobs to be built, regardless of whether there are changes or not." this code should not exist.

          I have a project without any SCM that breaks in these lines.

          Vladimiro Sa added a comment - - edited The problem seems to be under these lines: MultiJobBuilder.java (line 155) if ( !phaseConfig.isBuildOnlyIfSCMChanges() ){ return StatusJob.BUILD_ONLY_IF_SCM_CHANGES_DISABLED; } According to the description "I expected all jobs to be built, regardless of whether there are changes or not." this code should not exist. I have a project without any SCM that breaks in these lines.
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 167004 ] New: JNJira + In-Review [ 185654 ]

            hagzag hagzag
            docwhat Christian Höltje
            Votes:
            8 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated: