Aplantie
Aplantie

Reputation: 15

Set p4client from command line in perforce in a jenkins pipeline

I work on a jenkins pipeline to build a project loaded from perforce.

In concurent build, Jenkins setup the working workspace as pipeline-workspace@2 Problem is perfoce forbid @ character. Due to that the creation of the workspace/client in perforce fails since the p4client is by default using the path of the local workspace.

I would like to change the p4client to a custom value in a non-interactive way.

I ve read the p4 client doc bur can't figure out how to do it.

I am able to to it with the interactive prompt by setting by hand the p4client and the //depot streams value but i would like to it on the fly by my jenkins script.

Thanks

Upvotes: 0

Views: 419

Answers (1)

J Brown
J Brown

Reputation: 456

You can change the workspace delimiter by setting the hudson.slaves.WorkspaceList Java System Property in Jenkins.

-Dhudson.slaves.WorkspaceList=_

This will change your delimiter from the default @ to _

Upvotes: 2

Related Questions