If the pin to label field is set to a macro referencing a build parameter ( e.g. ${SOMEVAR} ), then syncing fails when that parameter value is left empty.
The expected behavior is that the workspace will be synced to head as if the pin to label field was left empty.
Code changed in jenkins
User: stuartrowe
Path:
src/main/java/org/jenkinsci/plugins/p4/tasks/CheckoutTask.java
http://jenkins-ci.org/commit/p4-plugin/9dba27bcfa43f95879c33bf175f725c5e2881188
Log:
JENKINS-29943: Check for empty param valuesAdding an isEmpty() check after expanding the value of the
populateLabel, since a parameter value may be empty.