Update on using MSDeploy for remote deployments.


This is a follow up to the post https://lostechies.com/blogs/hex/archive/2009/11/06/using-msdeploy-to-automate-your-enterprise-application-remote-deployments.aspx

 

The only trouble I have run into using this approach is that the runCommand does not bubble up error code or exit code from the command being executed on a remote machine.  This is a complete fail in my book.  You have to know that your process works and be notified when it does not.  In the mean time, the work around for my process works like this.

We kick this job off from Nant, so I capature the text output from the remote command, put it into a variable and than run a Regular Expression against it to determine if the remote process finished successfully or not.

Here is what this looks like in Nant ( oh.. that is some ugly xml)

 

image

So what is happening here?

The output of the exec command is being sent to a text file using the Output attribute.

The text file is then loaded into a variable called deploystep2.

The reg ex parses out the Build Success or Build Failed text from the file.

If build Failed is found than the _****_ tag fails the deployment and than the rest of our reporting process works as planned.

 

Thoughts.

(free) Training videos from the last year.