Possible to fail a deploy with WARN level messages?

We had a situation where a deploy succeeded according to the Octopus dashboard, but in reality didn’t work properly. On further investigation, we found a couple of WARN level messages in the Octopus deploy log

Is it possible to always fail a build on WARN level messages? Or at least, make any deploy with warnings visible on the dashboard?

Thanks

I tend to agree with Andrew on the WARN. At a minimum some indication that the deployment was only a “partial” success would be nice.

In a similar vein, I’d really like the deploy to fail when there is an ERROR message. Messages like this are annoying to find after Octopus says deployment was a “Success!” but the app is not working.

2012-06-19 19:49:24 ERROR Unable to copy the package to the specified directory ‘C:\inetpub\wwwroot\index’. One or more files in the directory may be locked by another process. You could use a PreDeploy.ps1 script to stop any processes that may be locking the file. Error details follow.
System.UnauthorizedAccessException: Access to the path ‘C:\inetpub\wwwroot\index\Default.aspx’ is denied.

Hi Andrew & Rick,

Thanks for the feedback, I’ll look at adding an extra state to the Octopus release to highlight warnings.

Rick, I agree that errors should definitely fail the build (ones like that especially) - I’ll look into why this isn’t happening and release a fix.

Paul

Hi Paul,

Thanks for the update. Just for context, see the WARN level log details below from one of our deploys. Obviously, if a config file can’t be updated, it’s unlikely that the deploy will work, so I would have liked to be notified somehow

2012-06-06 08:09:37 WARN Unable to update configuration file: C:\Octopus\Tentacle\Applications\MyApp.0.3.123.0\Web.config
System.ArgumentNullException: Value cannot be null.
Parameter name: value
at System.Xml.Linq.XAttribute.SetValue(Object value)
at Octopus.Tentacle.Conventions.XmlConfigVariables.ReplaceAttributeValues(XNode document, String xpath, String keyAttributeName, String keyAttributeValue, String valueAttributeName, String value) in c:\BuildAgent\work\7bf5272a44079f5\source\Octopus.Tentacle\Conventions\XmlConfigVariables.cs:line 75
at Octopus.Tentacle.Conventions.XmlConfigVariables.UpdateConfigurationFile(String configurationFilePath, ConventionContext context) in c:\BuildAgent\work\7bf5272a44079f5\source\Octopus.Tentacle\Conventions\XmlConfigVariables.cs:line 49
at Octopus.Tentacle.Conventions.XmlConfigVariables.AfterDeployment(ConventionContext context) in c:\BuildAgent\work\7bf5272a44079f5\source\Octopus.Tentacle\Conventions\XmlConfigVariables.cs:line 31

Hi Andrew,

I released a patch this morning that now causes the build to fail when a configuration file fails to update.

Paul