I have a pipeline script with agent any
which doesn't work anymore.
It is stuck @ Waiting for next available executor
pipeline {
agent any
stages {
stage('Stage1') {
steps {
sh 'java -version'
}
}
stage('Stage2'){
steps {
container('docker') {
sh 'docker version'
}
}
}
}
}
If I update it to use agent kubernetes then it starts working again.
pipeline {
agent {
kubernetes {
label "team-abc-jenkins-slave-${UUID.randomUUID().toString()}"
defaultContainer 'jnlp'
}
}
stages {
stage('Stage1') {
steps {
sh 'java -version'
}
}
stage('Stage2') {
steps {
container('docker') {
sh 'docker version'
}
}
}
}
}
It was working fine few days back and then stopped working. I am on Jenkins ver. 2.190.2
As you can see that a node/slave is started but its suspended
Issue was with the Host Path Volume, it was missing the initial / in /var/run/docker.sock