Jump to content

Jenkins Plastic Plugin confused by duplicated workspace names between projects


wyattetal

Recommended Posts

The setup:

 

Project A and Project B both use the plastic plug-in and both of these jenkins projects have the same workspace directory name.
When project B builds, project A's workspace directory is deleted.
Project B's log will indicate that the workspace directory within projectA's jenkins folder was deleted early in the build.
 
It might look like this:
Started by an SCM change
Building in workspace C:\JenkinsBuilds\ProjectB\workspace
[oneforall] $ "C:\Program Files\PlasticSCM5\client\cm" lwk --format={0}#{1}#{2}
oneforall#ENGBLD#c:\JenkinsBuilds\ProjectA\workspace\oneforall
[oneforall] $ "C:\Program Files\PlasticSCM5\client\cm" rmwk wk:oneforall
The workspace oneforall has been deleted.
FATAL: c:\JenkinsBuilds\ProjectA\workspace\oneforall\.plastic\plastic.lck: The process cannot access the file because it is being used by another process.

ERROR: null
Finished: FAILURE
 
or this:
 
Started by an SCM change
Building in workspace C:\JenkinsBuilds\ProjectB\workspace
[oneforall] $ "C:\Program Files\PlasticSCM5\client\cm" lwk --format={0}#{1}#{2}
oneforall#ENGBLD#c:\JenkinsBuilds\ProjectA\workspace\oneforall
[oneforall] $ "C:\Program Files\PlasticSCM5\client\cm" rmwk wk:oneforall
The workspace oneforall has been deleted.
[oneforall] $ "C:\Program Files\PlasticSCM5\client\cm" mkwk oneforall . --selector=selector7411337582865039699.txt
Workspace oneforall has been correctly created
[oneforall] $ "C:\Program Files\PlasticSCM5\client\cm" update .
Searching for changed items in the workspace...
 
 
 
 
Project A's next change poll looks like this:
>>>(is it also a bug that the plug-in determines that changes are present when wi returns EC 1? )<<< 
 
Started on May 26, 2016 6:56:00 AM
Polling SCM changes on master
[PlasticPull] $ "C:\Program Files\PlasticSCM5\client\cm" wi --machinereadable --fieldseparator=def#_#sep
c:\JenkinsBuilds\PROJECTA\workspace\PlasticPull is not in a workspace.
FATAL: Executable returned an unexpected result code [1]
ERROR: PlasticPull: Unable to retrieve workspace status.
hudson.AbortException
at com.codicesoftware.plugins.hudson.PlasticTool.execute(PlasticTool.java:89)
at com.codicesoftware.plugins.hudson.model.Server.execute(Server.java:31)
at com.codicesoftware.plugins.hudson.model.Server.getChangesets(Server.java:42)
at com.codicesoftware.plugins.hudson.model.Server.getBriefHistory(Server.java:122)
at com.codicesoftware.plugins.hudson.PlasticSCM.HasChanges(PlasticSCM.java:349)
at com.codicesoftware.plugins.hudson.PlasticSCM.compareRemoteRevisionWith(PlasticSCM.java:162)
at hudson.scm.SCM.poll(SCM.java:398)
at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1468)
at hudson.model.AbstractProject._poll(AbstractProject.java:1438)
at hudson.model.AbstractProject.poll(AbstractProject.java:1349)
at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:526)
at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:555)
at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Done. Took 2 sec
Changes found
 
The implication is that the Plastic plug-in is somehow maintaining state between invocations and then interacts badly with duplicated workspace names.
At first blush, the problem appears to be that the plugin is deleting workspaces even though "Use Update" is checked.
Changing A & B to have unique names works around the issue.
 
 
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...