We use DbUp to automate our database migrations by including a Deploy.ps1 in the script package created by TeamCity. We recently upgraded Octopus from 2.6.5 to 3.1.1 and we are no longer receiving the DbUp output in TeamCity when a script migration fails. When everything is successful we can view the build log in TeamCity and see all the script execution from the Octopus deploy, but when it fails all TeamCity reports in the build log is:
[Failed: Step 1: Deploy Database] The step failed: One or more child activities failed.
Where it used to report:
[07:17:21][Failed: Deploy.ps1] Executing SQL Server script ‘012_NODBML_Alter_Procedure_GetAccountingByTenantIdAndUserId.sql’
[07:17:21][Failed: Deploy.ps1] Executing SQL Server script ‘013_NODBML_Alter_Procedure_GetAccountingByPlanId.sql’
[07:17:21][Failed: Deploy.ps1] Executing SQL Server script ‘014_NODBML_ALTER_PROCEDURE_VendorGuide_GetAdvancedSearchResultsV2.sql’
[07:17:21][Failed: Deploy.ps1] Executing SQL Server script ‘015_NODBML_Data_Add_LookupEntity_RelationshipValidation.sql’
[07:17:21][Failed: Deploy.ps1] SQL exception has occured in script: ‘015_NODBML_Data_Add_LookupEntity_RelationshipValidation.sql’
[07:17:21][Failed: Deploy.ps1] Script block number: 1; Block line 9; Message:
[07:17:21][Failed: Deploy.ps1] System.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column ‘Form’, table ‘dbo.LookupEntity’; column does not allow nulls. INSERT fails.
[07:17:21][Failed: Deploy.ps1] The statement has been terminated.
The build configuration in TeamCity has not change, nor has the deployment project in Octopus. We do notice the “Task Log” in 3.1.1 does not seem to be as granular in terms of nested execution process down to the “Deploy.ps1” execution.
It was nice have the full output report back to TeamCity since only a select few have access to the Octopus side, while all our developers use TeamCity to view the build statuses.
Are we missing something trivial here? Any advice is much appreciated.