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

Running scheduleBuild from system groovy script crashes Jenkins

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core, groovy-plugin
    • None
    • version 1.620

      I am using a system groovy script to launch jenkins jobs as follows:

          def job = hudson.model.Hudson.instance.getJob(jobData['JobName'])
          def params = jobData['Parameters'].collect { key, val -> new hudson.model.StringParameterValue(key, val) }
          def paramsAction = new hudson.model.ParametersAction(params)
          def cause = new hudson.model.Cause.UpstreamCause(build)
          def causeAction = new hudson.model.CauseAction(cause)
          hudson.model.Hudson.instance.queue.schedule(job, 0, causeAction, paramsAction)
      

      This works fine, except if the system groovy script crashes or gets aborted. Then suddenly Jenkins appears to go into a death spiral, with the UI slowing down to a crawl and eventually crashing.

            vjuranek vjuranek
            cg Christian Goetze
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: