You will need to use the full DSL checkout , the p4sync DSL p4sync only basic. The easiest way is to use the Link Syntax link generator, select checkout: General SCM , then Perforce Software from the SCM list.
Then you can determine the detailed view. For instance:
checkout([ $class: 'PerforceScm', credential: 'phooey1666', populate: [ $class: 'AutoCleanImpl', delete: true, modtime: false, pin: '', quiet: true, replace: true ], workspace: [ $class: 'ManualWorkspaceImpl', charset: 'none', name: 'jenkins-${NODE_NAME}-${JOB_NAME}', pinHost: false, spec: [ allwrite: true, clobber: false, compress: false, line: 'LOCAL', locked: false, modtime: false, rmdir: false, streamName: '', view: ''' //depot/... //jenkins-${NODE_NAME}-${JOB_NAME}/... -//depot/tests/... //jenkins-${NODE_NAME}-${JOB_NAME}/tests/...''' ] ] ])
source share