I set up a credential using "Perforce Ticket Credential".
Set the values for P4Port, Login with Ticket Value, and Trust, click "test connection", and it reports "Success".
Set up a job (Pipeline DSL ) referring to this credential to do a p4sync. Got error reported as
Nov 24, 2016 2:16:08 PM org.jenkinsci.plugins.p4.client.ClientHelper clientLogin
SEVERE: P4: Unable to use Workspace: com.perforce.p4java.exception.RequestException: Perforce password (%'P4PASSWD'%) invalid or unset.
com.perforce.p4java.exception.RequestException: Perforce password (%'P4PASSWD'%) invalid or unset.
at com.perforce.p4java.impl.mapbased.server.Server.handleErrorStr(Server.java:4991)
at com.perforce.p4java.impl.mapbased.server.Server.getClient(Server.java:2435)
at org.jenkinsci.plugins.p4.client.ClientHelper.clientLogin(ClientHelper.java:93)
at org.jenkinsci.plugins.p4.client.ClientHelper.<init>(ClientHelper.java:81)
at org.jenkinsci.plugins.p4.tasks.AbstractTask.getConnection(AbstractTask.java:154)
at org.jenkinsci.plugins.p4.tasks.AbstractTask.setWorkspace(AbstractTask.java:65)
at org.jenkinsci.plugins.p4.PerforceScm.checkout(PerforceScm.java:365)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1741)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
The same steps works fine if I used "Perforce Password Credential".