If you are using Perforce server version 20141 or earlier P4jenkins uses a memory intensive version of 'p4 reconcile'. This older version skips permissions errors. For example:
If you are using a later version of P4D a new streaming reconcile is used that is faster and uses less memory. In this implementation permissions errors fail the build. For example:
Please add a flag that allows the old behavior to be used or the permissions error to be ignored.
(1) Create a freestyle job that syncs a file on Linux.
(2) Use the following shell script as a build step:
(3) Run the build.
(4) Run the build again. Error will be seen.
P4 will successfully delete the file but would throw error messages if it needed to update any of the files in this directory. Therefore I have also raised a P4Java bug.
$ p4 reconcile -w -f ...
//depot/permissions/submit/cfg/prod_Release.cfg#none - deleted as /filestoreSSD/18.2/ws/permissions/submit/cfg/prod_Release.cfg
//depot/permissions/toplevel/tst#1 - refreshing /filestoreSSD/Vagrant/Swarm/18.2/ws/permissions/toplevel/tst
open for write: /18.2/ws/permissions/toplevel/tmp.19271.140538254619008.94: Permission denied