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

multibranch streams don't allow lightweight checkout?

XMLWordPrintable

      I might have misconfigured my job, given this piece of documentation https://github.com/jenkinsci/p4-plugin/blob/master/docs/MULTI.md

      >Lightweight checkout is automatically applied by Jenkins to MultiBranch jobs

      However I'm running a multibranch job that is polling //depot/... to find streams. The actual sync for this project should be a very small subset of the matched stream, while the whole stream is many gigabytes worth of data.

      I have the following code in the Jenkinsfile

      pipeline {
          agent any
          stages {
              stage('Sync') {
                  steps {
                      checkout perforce(
                          credential: 'credentialname',
                          populate: autoClean(),
                          workspace: manualSpec(
                              charset: 'utf8',
                              name: "jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}",
                              spec: clientSpec(
                                  allwrite: true,
                                  view: """\
              //depot/${env.BRANCH_NAME}/ServerCode/... //\${P4_CLIENT}/ServerCode/...
              //depot/${env.BRANCH_NAME}/ApplicationCode/SubDir/... //\${P4_CLIENT}/ApplicationCode/SubDir/...
              """,
                                  streamName: "//depot/${env.BRANCH_NAME}"
                              )
                          )
                      )
                  }
              }
          }
      }
      

      but my console log shows a full sync of //depot/StreamName/... before this stage runs. Adding "options { skipDefaultCheckout() }" doesn't have any effect.

            p4karl Karl Wirth
            asmith_pipeworks Adam Smith
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: