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

Storing "jenkins.model.Jenkins.get().nodes" in local variable and sleeping causes "NotSerializableException" in vSphereCloudLauncher

XMLWordPrintable

      This simple pipeline script causes "java.io.NotSerializableException: org.jenkinsci.plugins.vSphereCloudLauncher" exception (see consoleText in attachments):

      import hudson.model.Node
      
      pipeline {
          agent {label 'master'}
          stages {
              stage('Defect reproducing stage') {
                  steps {
                      script {
                          List<Node> nodes = jenkins.model.Jenkins.get().nodes;
                          sleep(5);
                      }
                  }
              }
          }
      }
      
      

            Unassigned Unassigned
            alpanshin Alexandr Panshin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: