I am having issues executing a basic Powershell command. I have tried following the guidance in the following article but to no avail.
http://support.thoughtworks.com/entries/22873043-Go-s-custom-command
I have verified the file is in the correct directory, I have tested it on the server with the same command syntax, I have tried several different ways, but it simply doesn't work. I'm ultimately needing to pass parameters to commands but I can't even get a basic script working. This feels like I am missing something very obvious.
I am also frustrated by the lack of logging.. I want to see what GO is actually attempting to execute, not an "XML" version of it. What exact command did it execute and where from?
Any help would be appreciated. Thanks.
[go] Start to execute task: <exec command="powershell" workingdir="pkg" > <arg>install.ps1</arg> </exec>.
--snip--
The term 'install.ps1' is not recognized as the name of a cmdlet, function, scr ipt file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Comments
3 comments
Hi Joshua,
That should have worked. Maybe the working directory is wrong. This is the equivalent of the command it would have run:
cd C:\Program Files\Go Agent\pipelines\pipeline-name\pkg (or whatever is the right one for you)
cmd /c powershell install.ps1
Can you try that and see?
Cheers,
Aravind
I forgot to mention. We've moved the forums to the mailing lists mentioned on this page: http://www.go.cd/community/
Please use that from the next time, since this forum will not be monitored as actively as that one. Also, the other mailing lists have more people, who will be able to help quicker.
It was implicit in what I said earlier, but the actual "powershell" command runs on the Go Agent and not on the Go Server.
Please sign in to leave a comment.