From the sample code on Atlassian site
https://developer.atlassian.com/server/bamboo/executing-external-processes-using-processservice/
ExternalProcess process = ProcessService.createExternalProcess(taskContext, new ExternalProcessBuilder().*command*(Arrays.asList("**/bin/ls**")). workingDirectory(fileWorkingDir));
What Bamboo API should I use to fetch "/home/kshi/.local/bin/robot" and pass it to command(). Getting the values from TaskConfiguration configuration map, or TaskDefinition did not help.
I do have the below tag in my atlassian-plugin.xml
< executable key="**robot**" nameKey="RobotFrameworkTest.robotExecutable"/ >
RobotFrameworkTest.robotExecutable points to "robot"
I want to make use of the Executable defined in bamboo. (/home/kshi/.local/bin/root)
From the logs of the plan I can see that Bamboo is referring to the robot command as bamboo.capability.system.builder.command.robot, wondering if I have to use it in the same way in the code.
I have found a relevant link on Atlassian website hinting ways to use an executable.
@ComponentImport private final ProcessService processService;
@ComponentImport private final CapabilityContext capabilityContext;
public RobotTestTaskType(final ProcessService processService, final CapabilityContext capabilityContext)
{ this.processService = processService; this.capabilityContext = capabilityContext; }
String robotExecutable = capabilityContext.getCapabilityValue("system.builder.command.robot");