Sometimes when a job fails, it will stop polling Perforce for new changes and need to be manually kicked. This obviously greatly affects our CI pipeline.
This is found in the p4 polling log:
Started on Feb 2, 2021, 9:54:00 AM Executor number at runtime: 0 P4: Polling on: master with:Mainline-EC2AMAZ-AAAAAAA P4: Polling: No changes in previous build. P4: Polling error; no previous change. Done. Took 5 ms No changes
When this happens, the previous build will not have any changes listed, despite its p4 polling log declaring that it found changes. Perhaps the job is failing to record what changes it found?
Here is our pipeline. Of special note, we use a "staticSpec()" workspace and specify a custom "syncID" attribute. This is because we have multiple jobs sharing a same workspace per node (to take advantage of build object caching).
node('mainline') { stage('Sync') { dir ("C:\\Mainline") { checkout perforce( credential: 'P4Account', filter: [ pathFilter('//depot/tests'), pathFilter('//depot/docs'), ], populate: syncOnly( force: false, have: true, modtime: false, parallel: [enable: false, minbytes: '1024', minfiles: '1', threads: '4'], pin: '', quiet: true, revert: false ), workspace: staticSpec( charset: 'none', name: "Mainline-${env.COMPUTERNAME}", syncID: "Mainline-${env.COMPUTERNAME}-${env.JOB_NAME}", pinHost: false ) ) } } }
- relates to
-
JENKINS-40356 NPE on p4 polling
- Closed