I have setup a Kubernetes Pipeline (see below) which is working fine, as long as I do use shell-scripts to generate the Docker-Image. As soon as I try to use the docker-Workflow plugin, the script comes back, with an exception in a (not defined by myself) dockerFingerprintFrom-step. This step does not seem to be able to find the generated docker-image anymore. Therefor I do assume, that this step is then not run in the container, where I build the image. Any help is appreciated.
Unable to find source-code formatter for language: groovy. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
podTemplate(label: 'docker-mysql', containers: [
containerTemplate(name: 'docker', image: 'docker:1.12.3-dind', ttyEnabled: true, command: 'cat', privileged: true, instanceCap: 1),
containerTemplate(name: 'jnlp', image: 'jenkinsci/jnlp-slave:2.62-alpine', args: '${computer.jnlpmac} ${computer.name}'),
],
volumes: [
hostPathVolume(mountPath: "/var/run/docker.sock", hostPath: "/var/run/docker.sock")
]) {
node() {
stage('Preparation') { // for display purposes
git url: 'https://github.com/devopskube/docker-mysql.git'
container('docker') {
stage('Build the docker image') {
sh 'docker build -t devopskube/mysql:latest .'
sh 'docker inspect -f {{.Id}} devopskube/mysql:latest'
id = sh (
script: 'docker inspect -f {{.Id}} devopskube/mysql:latest',
returnStdout: true
).trim()
}
}
}
}
|