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

Pipline script for vSphere ExposeGuestInfo generates <object of type org.jenkinsci.plugins.vsphere.builders.ExposeGuestInfo>. Pipeline DSL ExposeGuestInfo Build fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • vsphere-cloud-plugin
    • vSphere Cloud Plugin v2.17, Jenkins v2.116, Jenkins v2.117

      After upgrading vSphere Cloud Plugin from 2.15 to v 2.17

      Pipline script for vSphere ExposeGuestInfo generates:
      vSphere buildStep: <object of type org.jenkinsci.plugins.vsphere.builders.ExposeGuestInfo>, serverName: ''

      Should generate:
      vSphere buildStep: [$class: 'ExposeGuestInfo', envVariablePrefix: 'VSPHERE', vm: 'vmName', waitForIp4: boolean], serverName: ""

       

      When run DSL Pipline with using vSphere build step: "Expose Guest Info" it fails with Error: null.

      #!/usr/bin/env groovy
      pipeline {
          agent any
          stages {
              stage('Expose VM IP') {
                  steps {
                      script{
                          hostIP = vSphere buildStep: [$class: 'ExposeGuestInfo', envVariablePrefix: 'VSPHERE', vm: test.ci.kit], serverName: 'testvcs'
                          echo "$hostIP"
                      }
                  }

              }
          }
          post {
              always {
                  // Clean-up the workspace
                  cleanWs()
              }
          }
      }

       
      Started by user
      vassil
      Running in Durability level: MAX_SURVIVABILITY[Pipeline] nodeRunning on
      slave-u1604-1
      in /opt/riajenk/workspace/Abivahendid/Vassilharjutab/ExposeGuestIP[Pipeline] {[Pipeline] stage[Pipeline] { (Expose VM IP)[Pipeline] script[Pipeline] {[Pipeline] vSphere[vSphere]
      [vSphere] Performing vSphere build step: "Expose Guest Info"
      [vSphere] Attempting to use server configuration: "testvcs"
      [vSphere] Exposing guest info for VM "vassilm-test.ci.kit" as environment variables
      [vSphere] Added environmental variable "VSPHERE_IpAddress" with a value of "10.0.24.55"
      [vSphere] Added environmental variable "VSPHERE_GuestId" with a value of "ubuntu64Guest"
      [vSphere] Added environmental variable "VSPHERE_ToolsVersion" with a value of "2147483647"
      [vSphere] Skipped "Disk" as it is of type class [Lcom.vmware.vim25.GuestDiskInfo;
      [vSphere] Added environmental variable "VSPHERE_AppState" with a value of "none"
      [vSphere] Added environmental variable "VSPHERE_GuestOperationsReady" with a value of "true"
      [vSphere] Added environmental variable "VSPHERE_InteractiveGuestOperationsReady" with a value of "false"
      [vSphere] Added environmental variable "VSPHERE_GuestStateChangeSupported" with a value of "true"
      [vSphere] Skipped "GenerationInfo" as it is of type class [Lcom.vmware.vim25.GuestInfoNamespaceGenerationInfo;
      [vSphere] Added environmental variable "VSPHERE_ToolsVersionStatus2" with a value of "guestToolsUnmanaged"
      [vSphere] Added environmental variable "VSPHERE_ToolsRunningStatus" with a value of "guestToolsRunning"
      [vSphere] Added environmental variable "VSPHERE_GuestFullName" with a value of "Ubuntu Linux (64-bit)"
      [vSphere] Skipped "Net" as it is of type class [Lcom.vmware.vim25.GuestNicInfo;
      [vSphere] Skipped "IpStack" as it is of type class [Lcom.vmware.vim25.GuestStackInfo;
      [vSphere] Skipped "Screen" as it is of type class com.vmware.vim25.GuestScreenInfo
      [vSphere] Added environmental variable "VSPHERE_GuestState" with a value of "running"
      [vSphere] Added environmental variable "VSPHERE_AppHeartbeatStatus" with a value of "appStatusGray"
      [vSphere] Skipped "GuestKernelCrashed" as it is a null value
      [vSphere] Added environmental variable "VSPHERE_ToolsStatus" with a value of "toolsOk"
      [vSphere] Added environmental variable "VSPHERE_ToolsVersionStatus" with a value of "guestToolsUnmanaged"
      [vSphere] Added environmental variable "VSPHERE_GuestFamily" with a value of "linuxGuest"
      [vSphere] Added environmental variable "VSPHERE_HostName" with a value of "vassilm-test"[Pipeline] }[Pipeline] // script[Pipeline] }[Pipeline] // stage[Pipeline] stage[Pipeline] { (Declarative: Post Actions)[Pipeline] cleanWs[WS-CLEANUP] Deleting project workspace...[WS-CLEANUP] done[Pipeline] }[Pipeline] // stage[Pipeline] }[Pipeline] // node[Pipeline] End of PipelineERROR: null
      Finished: FAILURE

       

            Unassigned Unassigned
            vassil vassil marjunits
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: