Some of our Deployments fail (since update to Octopus 1.4) with error code -12.
We added some output of “$LASTEXITCODE” to our Deploy.ps1 script and see that the exit code is not -12 but 0.
We also tried to add “Exit 0” at the end of our Deploy.ps1 script, but the following error appears again:
@@@
[…]
2013-03-14 17:58:06 INFO MongoDB: Rename Collection
2013-03-14 17:58:06 INFO Command: C:\Software\mongodb\bin\mongo.exe localhost/TA-STA --quiet --eval "db[‘FB_new’].renameCollection(‘FB’,true)"
2013-03-14 17:58:09 INFO [object bson_object]
2013-03-14 17:58:09 INFO ----------------------------------
2013-03-14 17:58:09 INFO Allowed ExitCodes : 0
2013-03-14 17:58:09 INFO ----------------------------------
2013-03-14 17:58:09 INFO LASTEXITCODE : 0
2013-03-14 17:58:09 INFO ----------------------------------
2013-03-14 17:58:09 INFO ================================================================================
2013-03-14 17:58:10 INFO Deployment End: 3/14/2013 6:58:09 PM
2013-03-14 17:58:15 DEBUG Script ‘C:\Octopus\Applications\TA-STA\KnowledgeBase.Mongo\1.3.0.7\Deploy.ps1’ completed with return code -12.
2013-03-14 17:58:15 ERROR Octopus.Tentacle.Deployment.Integration.PowerShell.ScriptFailureException: PowerShell script ‘C:\Octopus\Applications\TA-STA\KnowledgeBase.Mongo\1.3.0.7\Deploy.ps1’ returned non-zero exit code: -12. Deployment terminated.
[…]
@@@
Do we have to change anything in our scripts or is it because of the changes in Octopus handling the Powershell scripts in the last version?
Best regards,
Thomas