I found the bug...here it is:

    private String getConcurrentClientName(FilePath workspace, String 
p4Client) {
        if (workspace != null) {
            // Match @ followed by an integer at the end of the workspace 
path
            Pattern p = Pattern.compile(".*@(\\d+)$"); 
 <<<<<<<<<<<<<<<<<<<<<< @ is hard coded, but this separate can be changed 
by the user
            Matcher matcher = p.matcher(workspace.getRemote());
            if (matcher.find()) {
                p4Client += "_" + matcher.group(1);
            }
        }
        return p4Client;
    }


On Saturday, September 7, 2013 5:29:15 PM UTC-4, Andrew Barber wrote:
>
> I have been having problems with jenkins reusing the same client spec in 
> different workspaces for the same job.  I have a project (job?) set to 
> allow concurrent builds.  At one point this seemed to work correctly.  When 
> jenkins created a new workspace (foo@2) it would create a new clientspec 
> for that workspace (clientname@2).  I changed the "@" to be "_" due to path 
> problems with perl but now jenkins keeps using the original clientspec (and 
> changing the root)  for all workspaces, even when that client spec is 
> already in use by another active build!   Is there a way to uniqify the 
> clientspec by the workspace name?  I tried using the workspace as the 
> clientname but p4 doesn't allow "/" in the client name.  
>
> Here are the p4 settings for my project (I specify the client map):
> Project Details Workspace (client)[image: Help for feature: Workspace 
> (client)]<http://l-sim-25-011:8080/view/Master%20Jobs/job/t210-fullchip-sanity/configure#>
> Unable to check workspace against depot
>  Let Jenkins Create Workspace[image: Help for feature: Let Jenkins Create 
> Workspace]<http://l-sim-25-011:8080/view/Master%20Jobs/job/t210-fullchip-sanity/configure#>
>  Let Jenkins Manage Workspace View[image: Help for feature: Let Jenkins 
> Manage Workspace 
> View]<http://l-sim-25-011:8080/view/Master%20Jobs/job/t210-fullchip-sanity/configure#>
>  
>
>
> Client View Type Stream[image: Help for feature: 
> Stream]<http://l-sim-25-011:8080/view/Master%20Jobs/job/t210-fullchip-sanity/configure#>
>  View 
> Map from File[image: Help for feature: View Map from 
> File]<http://l-sim-25-011:8080/view/Master%20Jobs/job/t210-fullchip-sanity/configure#>
>  View 
> Map
> Any help appreciated.
>
> Andy
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to