Hi,
We are packaging up migrations and checking them into source control using ReadyRoll. When we attempt to deploy the package the Deploy.ps1 powershell script is executed and the sqlcmd.exe line is generated correctly and is outputted to the log. The deployment process is then terminated as a result of an error. If we run the powershell script manually from the server then the process works fine and the changes are deployed to the database. We’ve tried running the tentacle under the same domain user account as when we’re executing the script successfully manually and also tried passing in the admin credentials for sql server but the error still occurs either way.
I’ve included the error log below. Thanks for your help.
2013-05-14 10:52:33 INFO [Deploy Script] Starting ‘neutrino.testing’ Database Deployment to 'SQLSERVER\SQL2012’
2013-05-14 10:52:33 INFO [Deploy Script] Using SQL Server Authentication
2013-05-14 10:52:33 INFO [Deploy Script] sqlcmd.exe -b -S “SQLSERVER\SQL2012” -i “Migrations.Database_Package.sql” -v DatabaseName="web.testing"
2013-05-14 10:52:33 ERROR Octopus.Shared.Integration.Scripting.ScriptFailureException: Script ‘E:\WEB\Octopus\Applications\Testing\Web\7.0.13134.3_1\bin\Deploy.ps1’ returned non-zero exit code: 1. Deployment terminated.
at Octopus.Shared.Conventions.Implementations.ScriptConvention.RunScript(String scriptName, IConventionContext context) in c:\w\e6923628be6eaf72\source\Octopus.Shared\Conventions\Implementations\ScriptConvention.cs:line 25
at Octopus.Shared.Conventions.Implementations.DeployScriptConvention.Install(IConventionContext context) in c:\w\e6923628be6eaf72\source\Octopus.Shared\Conventions\Implementations\DeployScriptConvention.cs:line 20
at Octopus.Shared.Conventions.ConventionProcessor.Run[TConvention](IConventionContext context, Action2 conventionCallback) in c:\w\e6923628be6eaf72\source\Octopus.Shared\Conventions\ConventionProcessor.cs:line 75 at Octopus.Shared.Conventions.ConventionProcessor.RunConventions(IConventionContext context) in c:\w\e6923628be6eaf72\source\Octopus.Shared\Conventions\ConventionProcessor.cs:line 29 2013-05-14 10:52:33 ERROR Running rollback conventions... 2013-05-14 10:52:33 DEBUG [DeployFailed Script] Script: E:\WEB\Octopus\Applications\Testing\Web\7.0.13134.3_1\bin\DeployFailed.ps1 2013-05-14 10:52:34 INFO [DeployFailed Script] Deployment to 'SQLSERVER\SQL2012' failed. Any open transactions have been rolled-back. 2013-05-14 10:52:34 DEBUG Storing a record of the deployment. 2013-05-14 10:52:34 ERROR Octopus.Shared.Integration.Scripting.ScriptFailureException: Script 'E:\WEB\Octopus\Applications\Testing\Web\7.0.13134.3_1\bin\Deploy.ps1' returned non-zero exit code: 1. Deployment terminated. at Octopus.Shared.Conventions.Implementations.ScriptConvention.RunScript(String scriptName, IConventionContext context) in c:\w\e6923628be6eaf72\source\Octopus.Shared\Conventions\Implementations\ScriptConvention.cs:line 25 at Octopus.Shared.Conventions.Implementations.DeployScriptConvention.Install(IConventionContext context) in c:\w\e6923628be6eaf72\source\Octopus.Shared\Conventions\Implementations\DeployScriptConvention.cs:line 20 at Octopus.Shared.Conventions.ConventionProcessor.Run[TConvention](IConventionContext context, Action
2 conventionCallback) in c:\w\e6923628be6eaf72\source\Octopus.Shared\Conventions\ConventionProcessor.cs:line 75
at Octopus.Shared.Conventions.ConventionProcessor.RunConventions(IConventionContext context) in c:\w\e6923628be6eaf72\source\Octopus.Shared\Conventions\ConventionProcessor.cs:line 46
at Octopus.Tentacle.Deployment.DeploymentController.Execute(StoredPackage package, VariableDictionary variables, IActivityLog log) in c:\w\e6923628be6eaf72\source\Octopus.Tentacle\Deployment\DeploymentController.cs:line 50
at Octopus.Tentacle.Services.Jobs.JobQueue.RunDeploymentsOnBackgroundThread(Object ignored) in c:\w\e6923628be6eaf72\source\Octopus.Tentacle\Services\Jobs\JobQueue.cs:line 82