fandrei / AppMetrics

Apache License 2.0
8 stars 2 forks source link

MSDeploy .cmd scripts reference v1 of MSDeploy rather than v2 #125

Closed mrdavidlaing closed 11 years ago

mrdavidlaing commented 11 years ago

During the deploy to production the following 2 scripts:

AppMetrics-v315-TFS-build-51003_packages\TrackerLive\AppMetrics.deploy.cmd /Y
AppMetrics-v315-TFS-build-51003_packages\Analytics\AppMetrics.Analytics.deploy.cmd /Y

failed complaining that MSdeploy wasn't installed.

Turns out that the following line in the .cmd (line 20)

for /F "usebackq tokens=2*" %%i  in (`reg query "HKLM\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\1" /v InstallPath`) do (

Should have been

for /F "usebackq tokens=2*" %%i  in (`reg query "HKLM\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\2" /v InstallPath`) do (

Strangely, CIAPILatencyCollector-v166-TFS-build-51002_WebPackage\LatencyCollectorConfigSite.deploy.cmd worked.

I'd can't figure out why:

(a) the AppMetrics build seems to have been built against the wrong version of MSDeploy, whereas the LatencyCollectorConfigSite is correctly built against msdeploy v2 (b) Why the AppMetrics deploys worked successfully on the metrics.labs.cityindex.com box.

fandrei commented 11 years ago

I had a similar bug on metrics.labs.cityindex.com box. Initially all was working ok, but after some time it started terminating with error message that MSDeploy path is not found in registry. I tried reinstalling etc, but it didn't help. So I set MsDeployPath environment variable to work around this.

mrdavidlaing commented 11 years ago

Its really important that details like this make it into the upgrade notes.

The reason is that the deploy to production was almost cancelled because the deploy steps as written didn't work. It was lucky that I was around and could step in to massage the process; otherwise the deployment would have been thrown back to QA and it would have taken another 2 weeks to get it released again.

fandrei commented 11 years ago

Made note for the future.