We use perforce as our SCM tool.
When multiple builds of the same JOB are run, Jenkins creates a workspace for each build (running job) with an '@n' appended (where n is a digit such as @2, @3, etc... ).
For example:
job1 - /Nodes/path/job
job2 - /Nodes/path/job@2
job3 - /Nodes/path/job@3
job4 - /Nodes/path/job@4
We use the Post-Build Task plugin to run a p4 commands (in a script) on any files where a compile error was introduced during the build.
The perforce command syntax uses '@' to specify specific versions of a file.
For example:
p4 annotate /the/path/to/my/file@45678
...The p4 command fails when the '@' is in the path:
p4 annotate /Nodes/path/job@4/the/path/to/my/file@45678
...Perforce tries to process /Nodes/path/job@4 only!
CODE
====
The location where the '@' is defined and used in the jenkins-core:
FILE: jenkins-core/src/main/javs/hudson/slaves/WorkspaceList.java
USED HERE
----------
> public synchronized Lease allocate(FilePath base, Object context) throws InterruptedException {
> for (int i=1; ; i++) {
> FilePath candidate = i==1 ? base : base.withSuffix(COMBINATOR+i);
> Entry e = inUse.get(candidate);
> if(e!=null && !e.quick && e.context!=context)
> continue;
> return acquire(candidate,false,context);
> }
DEFINED HERE
-------------
>private static final String COMBINATOR = System.getProperty(WorkspaceList.class.getName(),"@");
}
|