Hi,
I have PowerShell script which executes completely correctly when I run it in powershell from my PowerShell Terminal. But in the Octopus it FAILS (although other scripts for that Deployment Target/Tenant are successful so it is not connections issue)
> $REPORT_PATH = "C:\Projects\FA\report"
> $SCRIPT_PATH= "C:\ProgramData\Packages\script.robot"
> $ADS_SERVER = "SERVER1:9000"
> $ROBOT_PATH="C:\Program Files\Test Framework\Robot Framework\Scripts"
> Write-Host("Running robot script")
& "${ROBOT_PATH}\robot.bat" -d $REPORT_PATH -v adsName:$ADS_SERVER -i Initialize $SCRIPT_PATH
So basically everything is correct until the last CODE line; I put the ampersand sign on purpose because that is how it works in PowerShell but I cannot make it work in Octopus.
I tried several options and I cannot make it work in Octopus. Please assist.
This is the output with error (I cannot find anything useful in this information so I am really not sure why it fails - I will be grateful for assistance - THANKS)
Running robot script
May 26th 2020 19:16:37
Error
Calamari.exe : NotSpecified: Traceback (most recent call last):
May 26th 2020 19:16:37
Error
At C:\Octopus\Work\20200526171634-5939-26\Bootstrap.ps1:38 char:1
May 26th 2020 19:16:37
Error
+ & “${env:TentacleHome}\Calamari\11.1.2\Calamari.exe” run-script -sen …
May 26th 2020 19:16:37
Error
***+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~***
May 26th 2020 19:16:37
Error
+ CategoryInfo : NotSpecified: (NotSpecified: T…ent call last)::String) [], RemoteException
May 26th 2020 19:16:37
Error
+ FullyQualifiedErrorId : NativeCommandError
May 26th 2020 19:16:37
Error
May 26th 2020 19:16:37
Error
At C:\Octopus\Work\20200526171634-5939-26\Script.ps1:44 char:1
May 26th 2020 19:16:37
Error
+ & “${ROBOT_PATH}\robot.bat” -d $REPORT_PATH -v adsName:$ADS_SERVER -i …
May 26th 2020 19:16:37
Error
***+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~***
May 26th 2020 19:16:37
Error
at , C:\Octopus\Work\20200526171634-5939-26\Script.ps1: line 44
May 26th 2020 19:16:37
Error
at , C:\Octopus\Work\20200526171634-5939-26\Bootstrap.Script.ps1: line 1532
May 26th 2020 19:16:37
Error
at , : line 1
May 26th 2020 19:16:37
Error
at , : line 1
May 26th 2020 19:16:37
Fatal
The remote script failed with exit code 1
May 26th 2020 19:16:37
Fatal
The action … failed