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

P4 Plugin should allow checkout to subdirectory

    Details

    • Similar Issues:

      Description

      In the P4Jenkins plugin, please add the functionality to "checkout to subdirectory" when defining either "Stream" or "View Mappings". 

      Customer would like to have the functionality to define a stream, and also have this stream checkout into a sub directory in the Jenkins workspace without having to fill in the "View Mappings" from a client spec by hand, with the directory present. 

        Attachments

          Issue Links

            Activity

            Hide
            p4karl Karl Wirth added a comment -

            Hi Dan Dawson

            I think I'm going to link this request to JENKINS-47005 if that's acceptable.

            Are you using Freestyle or pipeline jobs? In pipeline you can use the 'ws' directive as  workaround. For example the following sets the root directory for the command in brackets to '/var/lib/jenkins/XXXXX/KarlTest':

            pipeline {
              agent { label 'master' }
              stages {
                stage("SyncMyWorkspace") {
                  steps {
                     ws('/var/lib/jenkins/XXXXX/KarlTest/') {
                p4sync charset: 'none', credential: 'JenkinsMasterAdminUser', format: 'jenkins-${NODE_NAME}-${JOB_NAME}', populate: autoClean(delete: true, modtime: false, parallel: [enable: false, minbytes: '1024', minfiles: '1', threads: '4'], pin: '', quiet: true, replace: true, tidy: false), source: depotSource('//depot/test/...')
                       }
                  }
                }
              }
            }
            

             

             

            Show
            p4karl Karl Wirth added a comment - Hi Dan Dawson I think I'm going to link this request to JENKINS-47005 if that's acceptable. Are you using Freestyle or pipeline jobs? In pipeline you can use the 'ws' directive as  workaround. For example the following sets the root directory for the command in brackets to '/var/lib/jenkins/XXXXX/KarlTest': pipeline { agent { label 'master' } stages { stage( "SyncMyWorkspace" ) { steps { ws( '/ var /lib/jenkins/XXXXX/KarlTest/' ) { p4sync charset: 'none' , credential: 'JenkinsMasterAdminUser' , format: 'jenkins-${NODE_NAME}-${JOB_NAME}' , populate: autoClean(delete: true , modtime: false , parallel: [enable: false , minbytes: '1024' , minfiles: '1' , threads: '4' ], pin: '', quiet: true , replace: true , tidy: false ), source: depotSource(' //depot/test/...') } } } } }    
            Hide
            dand Dan Dawson added a comment - - edited

            Hi Karl Wirth,

            This ticket was tested with a 'Freestyle' job, as with the customer's setup. 

            Linking it to that ticket sounds good to me. 

            Thanks!

            Show
            dand Dan Dawson added a comment - - edited Hi Karl Wirth , This ticket was tested with a 'Freestyle' job, as with the customer's setup.  Linking it to that ticket sounds good to me.  Thanks!
            Hide
            p4karl Karl Wirth added a comment -

            Hi Dan Dawson - Thanks.

            Show
            p4karl Karl Wirth added a comment - Hi Dan Dawson - Thanks.

              People

              • Assignee:
                Unassigned
                Reporter:
                dand Dan Dawson
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: