-
Bug
-
Resolution: Unresolved
-
Major
The attached zip contains a pipeline that validates as a proper declarative pipeline.
This works if the job is executed as a standalone job but fails when run as a multibranch job.
The essence of the Jenkinsfile is this:
#!groovy pipeline { agent { dockerfile { label 'docker_host' } } stages { stage('Build') { steps { sh "./gradlew compileJava" warnings consoleParsers: [[parserName: 'Java Compiler (javac)']] } } stage('test') { steps { sh './gradlew test' } } } }
This fails with:
java.nio.file.NoSuchFileException: /data/jenkins/workspace/ulti_p4-declarative-example-4DCI7I5YYY7ITMLOREMVBM6HIQ7AUGQMK4H72QBS6XTHJ6OD7QNA/Dockerfile at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
with messages above indicating that only the Jenkinsfile file has be synced to the workspace.
Thank you for the example. It looks like I need to add the docker-plugin and setup a 'Cloud' for Docker. My development environment is pinned to a very old version of Jenkins (I test against my oldest supported version 1.642.3). It might be time to push the min version for testing
I think I can understand the problem; for the moment you might be able to use Helix Streams - Multi Branch as they sync the whole stream and not just the Jenkinsfile.