I want to use the unique shell in ElectricCommander (EC). How do I specify in the "Shell" property of Procedure Step to use a unique shell that is installed on one of the resources?
In my case I want to use msys.
I am using Electric Commander and creating a new Procedure Step. I know about shells, cmd, sh, mysql, powershell.
Answer by whitecat · Aug 09, 2013 at 02:01 PM
I found out how to do it. If you want to use your own shell you must provide the direct path to that shell executable. For example:
C:\path\to\executable\*.exe
I wish this would be added to the help file.
Answer by lrochette · Aug 07, 2013 at 11:34 AM
your steps are saved in a file after substitution and it's sent on the agent.
This shell will be used to execute the stepâs commands on a resource. For example, using sh or cmd /c, the agent saves the command block to a temporary file with a .cmd extension and runs it:
sh foo.cmd or cmd /c foo.cmd
If you do not specify a shell on a step, at step run-time the server looks at the resource shell. If a resource shell is not set, the shell line used by the agent is platform dependent:
Windows:
cmd /q /c "{0}.cmd"
UNIX:
sh -e "{0}.cmd"
When you specify a shell (in the step or resource), and omit the cmd-file marker, the agent notices the omission and takes the correct action.
For example: a user specifies sh -x. The agent converts this to sh -x "{0}.cmd"
Two alternate forms of shell syntax where Commander uses a "marker," {0}, as a placeholder for the command file argument:
{0}
In this example, the command file is not meant to be the last argument in the final command line.
For example, mysql -e "source {0}"
This shell example runs the mysql command against this step's command containing sql.
{0}<.file extension>
In this example, the shell requires the command file to end in an extension other than .cmd.
For example, powershell "& '{0}.ps1'"
This shell example runs Microsoft PowerShell against this step's command containing PowerShell commands.
Notes:
use utf8; ElectricCommander::initEncodings
running linux command with mks toolkit(ksh shell) in windows 1 Answer
How does Electric Commander use bash.profile? 3 Answers
How do I call vcvarsall.bat to set the environment for a Commander step? 3 Answers
Best practices for "atomic" modifications to ElectricCommander properties 1 Answer
how to select and delete multiple procedures from a project 1 Answer
Electric Cloud powers Continuous Delivery, helping organizations developing deliver better software faster by automating and accelerating build, test, and deployment processes at scale. Industry leaders like Qualcomm, SpaceX, Cisco, GE, Gap, and E*TRADE use Electric Cloud solutions to boost DevOps productivity and Agile throughput.