I have a pipeline which uses the Kubernetes Jenkins plugin:

pipeline {
  agent {
    kubernetes {
      cloud 'icp-global'
      defaultContainer 'node'
      // customWorkspace '/workspace'
      yamlFile 'buildPod.yaml'
    }

but would like to run another step outside of containers, like:
  stage('deploy') {
      steps {
        node('rhel7') { <-- outside of k8s
          sh '''
            do the thing
          '''
        }
      }
    }

But I get:

[Bitbucket] Notifying commit build result
[Bitbucket] Build result notified
java.lang.ClassCastException: hudson.plugins.swarm.SwarmSlave cannot
be cast to org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave
        at 
org.csanchez.jenkins.plugins.kubernetes.pipeline.ContainerExecDecorator$1.launch(ContainerExecDecorator.java:250)
        at hudson.Launcher$ProcStarter.start(Launcher.java:455)
        at 
org.jenkinsci.plugins.durabletask.BourneShellScript.launchWithCookie(BourneShellScript.java:233)
        at 
org.jenkinsci.plugins.durabletask.FileMonitoringTask.launch(FileMonitoring


Is this not supported?

-- 
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAGO7Ob2Fn-LYv42_WKPNU39-TN79q%3DKiP4_rmaWO%3DN9Zpn5Qhw%40mail.gmail.com.

Reply via email to