Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Changes to Shell/Batch Command step from 5.0.31 to 5.1.10 #2677

amn ·
We have a script runs using this step type.

In the variables tab produced by the build it is shown as this value (for both versions): bin/occ start '\*' local

This step runs perfectly on 5.0.31 and all previous versions of QuickBuild. When I run this on 5.1.10 however, the step fails because it runs start \* local according to the log instead of how it use to act running start * local.

My guess is we could change the quotes or escape characters to fix this, but this isn't a small change and is controlled outside of QuickBuild so the fact that it appears to not be backwards compatible is extremely problematic.

Was there a known change to how this step functions and is this an issue with that?
  • replies 5
  • views 1902
  • stars 0
robinshen ADMIN ·
How is your command step defined? And if it references a variable, please also let me know how the variable is defined.
amn ·
We have a groovy file in a Maven Artifact Repository. This variable reads it:

control_stop_string = ${groovy:new ConfigSlurper().parse(vars.getValue("commandScriptUrl").toURL().getText()).control.commands.stop}

Then the step is just a Shell/Bash type with the command: ${vars.getValue("control_stop_string")}

The part of the groovy file that it reads:

control {
commands {
start = /bin\/occ start '\*' local/
stop = /bin\/occ shutn '\*' local/
}
robinshen ADMIN ·
QB 5.1 changes the way of executing shell command to wrap the command itself inside a shell script to make it executing exactly the same way as if you are executing it directly from command line. When executing directly from command line the single quote will be removed so the actual params passing to "occ" will be: start \* local
amn ·
This breaks so many of our teams and projects that it would break any project built prior to the upgrade and will need to be rebuilt after the upgrade. Is there a possibility to make this backwards compatible at all?
robinshen ADMIN ·
I filed an improvement request to add an option so that QB operates the same way as before when comes to execute external command:
http://track.pmease.com/browse/QB-1946

Please watch this issue and we will get this fixed in next one or two patch releases.