How to run script task from bamboo plugin?

I have a task that works in a bamboo plugin as an external process. I can not run commands such as "echo $ PATH", because it gives an error "executable file not found". I need to run a script task with an external process to do this. The requirement is to run the script command from the bamboo plugin in the custom task type plugin.

public ExternalProcess Exec(List<String> pLArg, List<String> pLOpt, String sPwd,
           String projectUserId, Map<String, String> variables)
{
   TaskContext pContext = GetContext();
   List<String> pLCmd = new LinkedList<String>();

   pLCmd.add("echo $PATH ");
   return Exec(pLCmd, sPwd);
}
+4
source share

Source: https://habr.com/ru/post/1683802/


All Articles