Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-47630

p4-plugin should support multi-branch declarative pipelines with default checkout

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • p4-plugin

      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.

            p4paul Paul Allen
            fkykko Staffan Forsell
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: