kubernetes-jenkins-plugin

When I use Kubernetes as my agent in Jenkins it will not allow another executor in stage

别来无恙 提交于 2020-12-11 02:45:33
问题 This is a subset of my declarative Jenkinsfile: pipeline { agent { kubernetes { yamlFile 'pod.yml' defaultContainer 'tools' } } stages { stage('Init') { // <- this stage executes in Kubernetes and works very well steps { sh "echo init" } } stage('Build') { agent { label 'B202981' } // <- This wont work; B202981 is computer on my network steps { sh "echo build" } } } } When this pipelines runs it fails with an exception which you can see here and googling this exception didn't helped me. java