lockable-resources-plugin
lockable-resources-plugin copied to clipboard
In version 2.0 can't execute Windows batch or Ant script
I have a problem to use version 2.0 on Windows Server 2008. After locking resources with name dev-build-sql I can't execute Windows batch or call Ant script. I'm getting java error:
[lockable-resources] acquired lock on [dev-build-sql]
Building in workspace D:\jenkins\jobs\Test-lock\workspace
[workspace] $ cmd /c call C:\Users\CSIDEV\AppData\Local\Temp\jenkins583201663619856164.bat
The parameter is incorrect
FATAL: command execution failed
java.io.IOException: CreateProcess error=87, The parameter is incorrect
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.
In case no lock is set batch executed successfully. I suspect that setting environment variable during resource lock operation is causing the error. Either the name of the environment variable is not compatible with windows environment, or the value is too long. Changing resource name to DEV_BUILD_SQL didn't help.
Forced to rollback to the plugin version 1.10.
I'm having the same problem in version 2.1
Ditto. Any workarounds?
Workaround: This plugin is pretty much a duplicate of lockable resources. I've tested it for a while and it seems to work fine.
https://wiki.jenkins.io/display/JENKINS/Exclusion-Plugin
Can somebody check it with latest release? I test the plugin on Windows (built-in) and Windows (agent) and it works as expected. Also we use Unix (built-in) and several operating systems as agents. And it works.
Probably same as here #52