| Michael Rose Thanks again. Problem reproduced. Reproduction steps: (1) mkdir linktest (2) cd linktest (3) echo Content > target.txt (4) ln -s target.txt link (5) p4 add * && p4 submit -d "Adding links" (6) Create a new pipeline job that maps the 'linktest' directory. For example:
pipeline {
agent { label 'master' }
stages {
stage("Repro") {
steps {
script {
// Try same sync with checkout and p4sync. Swap by commenting out command not being tested.
// p4sync charset: 'none', credential: 'Jenkins', populate: forceClean(have: false, parallel: [enable: false, minbytes: '1024', minfiles: '1', threads: '4'], pin: '', quiet: false), source: depotSource('//depot/testlink/...')
checkout perforce(credential: 'Jenkins', populate: forceClean(have: false, parallel: [enable: false, minbytes: '1024', minfiles: '1', threads: '4'], pin: '', quiet: false), workspace: manualSpec(charset: 'none', cleanup: false, name: 'jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}', pinHost: false, spec: clientSpec(allwrite: false, backup: true, changeView: '', clobber: true, compress: false, line: 'LOCAL', locked: false, modtime: false, rmdir: false, serverID: '', streamName: '', type: 'WRITABLE', view: '//depot/testlink/... //jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}/...')))
// List directory contents
sh 'ls -lR'
}
}
}
}
}
(7) When job runs with 'p4sync' the 'link' file is a plain text file containing the word 'target.txt':
-r--r--r-- 1 jenkins jenkins 20 Jun 11 10:27 link
When job runs with 'checkout' the file is a symlink:
lrwxrwxrwx 1 jenkins jenkins 20 Jun 11 10:33 link -> target.txt
|