I have followed the course to install plugins into my jenkins instance using plugin-installer.sh
Thereafter, I’ve configured a pipeline script as such:
pipeline {
agent any
stages {
stage('git version') {
steps {
sh "git version"
}
}
stage('maven version') {
steps {
sh "mvn -v"
}
}
stage('docker version') {
steps {
sh "docker -v"
}
}
stage('kubernetes version') {
steps {
sh "kubectl version --short"
}
}
}
}
I am not able to get docker to run in the jenkins pipeline with error log message as follows:
/var/lib/jenkins/workspace/checking-versions@tmp/durable-703a22ed/script.sh: 1: /var/lib/jenkins/workspace/checking-versions@tmp/durable-703a22ed/script.sh: docker: not found