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

Final blank line in "Blocking Jobs" causes job to stop

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • build-blocker-plugin
    • None
    • Build Blocker 1.7
      Jenkins 1.609.1

      If the "Blocking Jobs" field contains a final blank line, then the job will not be run. It seems to result in a situation where "any running job will block".

      While this is easily amended if you configure Jenkins manually, it becomes problematic if you use Jenkins Job Builder to generate the job configuration, because the XML configuration will look like this:

          <hudson.plugins.buildblocker.BuildBlockerProperty>
            <useBuildBlocker>true</useBuildBlocker>
            <blockingJobs>^emt_.*Deploy$
      ^emt_.*Build$
      </blockingJobs>
          </hudson.plugins.buildblocker.BuildBlockerProperty>
      

      The newline before </blockingJobs> would cause a split on newline to result in a 3rd empty string. If I manually remove the blank line, the job works as intended. So I suppose a trim() before the split() would do the trick.

            Unassigned Unassigned
            emt Erik Thaysen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: