Error Notifications

Topics: Server Deployment
Jun 16, 2014 at 2:25 PM
Is there a way to send notifications when deployment fails? We are using BTDF for deployments. We will provide the .bat file to deployment team which performs the task of uninstalling the application and installing the application using the MSI created by using deployment framework. Can you please advice us if there is any way to configure notifications in case of errors?
Jun 16, 2014 at 4:27 PM
There is nothing like that built in, but you can use the MSBuild Extension Pack's Email task. In your .btdfproj you can use the following (untested) to override the entry point task for the server deploy and add the new task.
  <Target Name="ServerDeploy">
    <CallTarget Targets="DeployBizTalkMgmtDB_$(DeployBizTalkMgmtDB)"/>
    <OnError ExecuteTargets="SendEmailNotification" />

  <Target Name="SendEmailNotification">
      <Recipient Include=""/> 
      <Recipient Include=""/> 

      TaskAction="Send" Subject="$(BizTalkAppName) Deployment Failed" SmtpServer="yoursmtpserver"
      MailFrom="" MailTo="@(Recipient)" Body="body text" /> 
In addition to this, you'll need to include their DLL with your app and reference it using a UsingTask element (see MSBuild and their documentation).

Marked as answer by tfabraham on 6/17/2014 at 8:29 PM
Jun 17, 2014 at 3:06 PM
Thanks Tom. It helped me. I did override the entry point task as you mentioned. Also, instead of using MSBuild.ExtensionPack.Communication.Email, I created MS Build task which sends request to our internal Email Webservice.