This is a snippet from my Jenkinsfile
:
stage('Checkout project') {
checkout scm
}
scalaImage = docker.image('<myNexus>/centos-sbt:2.11.8')
stage('Test project') {
docker.withRegistry('<myNexus>', 'jenkins-nexus') {
scalaImage.inside('-v /var/lib/jenkins/.ivy2:/root/.ivy2') { c ->
sh 'sbt clean test'
}
}
}
When I look in the docs for what .inside
does I find:
- Automatically grab a slave and a workspace (no extra node block is required).
- Pull the requested image to the Docker server (if not already cached).
- Start a container running that image.
- Mount the Jenkins workspace as a “volume” inside the container, using the same file path
My question is regarding the last two words of point 4. Is there a way to get the file path that the plugin is using to mount the code into the docker container?
Thank you.