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.

Set value from "Build > Shell/Batch Command" step #4299

retzero ·


I'm looking for the way to set build variable from Build > Shell/Batch Command step.
Below script failed to set variable.
Could you please guide me how to use this from Build > Shell/Batch Command step.

echo  ${vars.get("TEST_VAR")}

result_lines=$(bash ./

echo "===="
echo "$result_lines" # <== OK.
echo "===="

${vars.get("TEST_VAR").setValue("$result_lines")} # <== FAIL. Updated to the raw string "$result_lines" not the actual texts.
${vars.get("TEST_VAR").setValue("${result_lines}")} # <== FAIL. mvel
  • solved #2
  • replies 1
  • views 265
  • stars 0
robinshen ADMIN ·

This is not possible. All embedded scripts will be evaluated before your command is executed. To capture outout of a command, please change your step type to "Misc/Execute Script", and define the script as:

def output = util.readOutput("bash " + configuration.workspaceDir.absolutePath + "/");