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

Pipeline editor icon brings up blank screen if library calls made

XMLWordPrintable

    • Blue Ocean - Candidates

      I have a declarative pipeline stored in a Jenkinsfile in a multibranch pipeline in GitHub. I can create a new pipeline in Blue Ocean and get a successful run.

      However, when I click on the "pencil" icon (second icon from the right - next to the star icon) in the master branch, all I get is a blank screen.

      I figured out what provokes this. I have a Jenkinsfile like the one below.

      #!groovy
      pipeline {
      agent

      { label 'worker_node1'}

      libraries

      { lib('Utilities2') }

      stages {
      stage('Source') {
      steps

      { checkout scm stash name: 'test-sources', includes: 'api/**, dataaccess/**, util/**, build.gradle, settings.gradle' }

      }
      stage('Build') {
      // Run the gradle build
      steps

      { sh 'echo hi' gbuild '-x test build' }

      }
      }
      }

      The gbuild call is a function defined in the 'Utilities2' lib that I pull in the libraries section. As soon as I add any call to any function in a library that I include, I get the blank screen. Without that call, I can edit it. (And by the way, this code works fine when executing the pipeline.)

      The debugger in the browser flags this:

      unreachable code after return statement[Learn More] jenkins-js-extension.js:10890:12

            Unassigned Unassigned
            bclaster Brent Laster
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: