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?
--