After upgrading P4 plugin from 1.9.4 to the latest version 1.9.6 the following error occurs in Jobs that use multi configuration parameters in client spec:
P4: Unable to setup workspace: com.perforce.p4java.exception.RequestException: Error in client specification. Error detected at line 18. Null directory (//) not allowed in '//depot/dev//...'. at com.perforce.p4java.impl.mapbased.server.cmd.ResultMapParser.handleErrorStr(ResultMapParser.java:145) at com.perforce.p4java.impl.mapbased.server.cmd.ResultMapParser.parseCommandResultMapIfIsInfoMessageAsString(ResultMapParser.java:96) at com.perforce.p4java.impl.mapbased.server.cmd.ClientDelegator.updateClient(ClientDelegator.java:192) at com.perforce.p4java.impl.mapbased.server.Server.updateClient(Server.java:1506) at com.perforce.p4java.impl.mapbased.client.Client.update(Client.java:507) at org.jenkinsci.plugins.p4.client.ClientHelper.updateClient(ClientHelper.java:181) at org.jenkinsci.plugins.p4.client.ClientHelper.clientLogin(ClientHelper.java:159) at org.jenkinsci.plugins.p4.client.ClientHelper.<init>(ClientHelper.java:101) at org.jenkinsci.plugins.p4.tasks.CheckoutTask.initialise(CheckoutTask.java:61) at org.jenkinsci.plugins.p4.PerforceScm.checkout(PerforceScm.java:477) at hudson.scm.SCM.checkout(SCM.java:504) at hudson.model.AbstractProject.checkout(AbstractProject.java:1208) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499) at hudson.model.Run.execute(Run.java:1810) at hudson.matrix.MatrixBuild.run(MatrixBuild.java:323) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) ERROR: P4: Unable to initialise CheckoutTask: hudson.AbortException: Error in client specification. Error detected at line 18. Null directory (//) not allowed in '//depot/dev//…'.
I attached a repro case as Jenkins config.xml file.
The relevant part of the client spec:
<view>//depot/dev/${VARIANT}/... //jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}/...</view>
The parameter ${VARIANT} is defined as matrix job axis but is replaced with 'empty string' by version 1.9.6 of the plugin.
I've also seen there have been changes regarding to multi branch config with this release, maybe this is a hint.