2
votes

No matter how many times I attempt to deploy my recently migrated ASP.NET MVC Core 2.0 app from VSTS CD, I only see old builds that were created before I migrated the project and VSTS CI build steps.

No error messages. Everything is making happy noises. However, I have the build number injected into the appsettings.json so I can see which build is in production, AND I've made several tiny aesthetic changes just to know for sure there's a new build of the software out on production and I am 100% confident the latest build is not being served.

  1. I migrated my web app from ASP.NET MVC Core 1.1.2 to ASP.NET MVC Core 2.0.0. The last two successfully deployed 1.1 builds were #259 & #260.

  2. I updated the VSTS build process using the "preview" 2.0 steps and got it producing successful builds. This new build is #270.

  3. The VSTS release process reported no errors when deploying to Azure Web Apps Websites in a Staging slot.

  4. I swap the slots without any errors.

  5. However, I only see builds #259 and #260 as I try and re-try to re-release build #270 manually and re-swap the slots after VSTS CD gives me a successful response.

At this point, I'm considering going into Kudu and just deleting everything to force Azure Web Sites Web Apps to give me an obvious error message.

Before I do that, however, I wanted to ask if there's anything obvious I'm missing? Unlike the CI feature, VSTS CD has no verbose logging (AFAICT) and I can't locate any logging on Azure Web App's side regarding deployment attempts.

Here's a history of the builds ... all successful:

History of the builds ... all successful

For context, here's the overall pipeline:

enter image description here

Here's the definition for Azure App Service:

enter image description here

Update 8/24 10am:

This morning, based on @starain-MSFT's comment, I did the following:

  1. In Azure, I stopped both staging and production slots.

  2. Back in VSTS in the release definition, in the "Azure App Service Deploy" task, I checked and yes, "Publish using Web Deploy" was already checked.

  3. I added a checkmark to "Remove additional files at destination".

  4. I created a new release (#110).

  5. I check the logs for the "Deploy Azure App Service" release task:

2017-08-24T14:53:01.7169084Z ##[section]Starting: Deploy Azure App Service 2017-08-24T14:53:01.7419076Z ============================================================================== 2017-08-24T14:53:01.7419076Z Task : Azure App Service Deploy 2017-08-24T14:53:01.7419076Z Description : Update Azure Web App Services, Web App On Linux , Function Apps, Mobile Apps using Web Deploy / Kudu REST APIs 2017-08-24T14:53:01.7419076Z Version : 3.3.13 2017-08-24T14:53:01.7419076Z Author : Microsoft Corporation 2017-08-24T14:53:01.7419076Z Help : [More Information](https://aka.ms/azurermwebdeployreadme) 2017-08-24T14:53:01.7419076Z ============================================================================== 2017-08-24T14:53:03.7273244Z Got connection details for Azure App Service:'beastmuffin' 2017-08-24T14:53:04.4099686Z [command]"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:package='d:\a\r1\a\BeastMuffin-CI\drop\270.zip' -dest:contentPath='beastmuffin',ComputerName='https://beastmuffin-staging.scm.azurewebsites.net:443/msdeploy.axd?site=beastmuffin',UserName='********',Password='********',AuthType='Basic' -enableRule:AppOffline -userAgent:VSTS_3ba069a5-b836-4fd5-9b7a-158f8f07399f_release_1_110_110_1 2017-08-24T14:53:05.4251931Z Info: Using ID '5285835e-1d30-414e-bcb6-288c207678ac' for connections to the remote server. 2017-08-24T14:53:16.2964958Z Info: Deleting file (beastmuffin\Accessibility.dll). 2017-08-24T14:53:16.2964958Z Info: Deleting file (beastmuffin\Accessibility.xml).

... about 3000 lines later ...

2017-08-24T14:54:43.0840845Z Info: Deleting file (beastmuffin\zh-Hant\System.Spatial.resources.dll). 2017-08-24T14:54:43.0840845Z Info: Deleting directory (beastmuffin\zh-Hant). 2017-08-24T14:54:43.0840845Z Total changes: 3009 (0 added, 3009 deleted, 0 updated, 0 parameters changed, 0 bytes copied) 2017-08-24T14:54:43.0980858Z Successfully deployed web package to App Service. 2017-08-24T14:54:44.9961584Z Successfully updated deployment History at https://beastmuffin-staging.scm.azurewebsites.net/deployments/1101503586484042

So, it looks like it deleted the old files, but did not deploy / add the new build's files to Azure -- HOWEVER the COMMAND to deploy (per the logs) did not throw any exceptions.

Just to confirm nothing really got deployed, I visit the site and see this now:

enter image description here

So, I'm guessing there's no files in the production slot at the moment.

Update 8/24 1pm:

One new pertinent detail as I continue to debug this.

The new (preview) App Service Editor shows that the .zip file has been moved to the /wwwroot folder, however it does not unzip it.

enter image description here

Based on the logs and the .zip file, I'm beginning to think that the "Deploy Azure App Service" task doesn't yet support ASP.NET MVC Core 2.0.

To that end, I've opened a support issue on the vsts-tasks GitHub repo:

https://github.com/Microsoft/vsts-tasks/issues/5111

1
Regarding step5, how do you do? You can check Remove additional files at destination option if you publish using web deploy (check Publish using web deploy option). Can you share the detail release log on the OneDrive?starian chen-MSFT
@starain-MSFT Here's the zipped log files from the most recent release attempt: 1drv.ms/f/s!AvZL4t4dMuo5lq0ZNAhbsZYgZxqP2QBob Tabor
@starain-MSFT Please take a look at my update (above). I can see where files are now being deleted, but the new build is not copied over.Bob Tabor
The file you shared is not the release log, on the other hand, share the build log on the OneDrive too. (Set/add system.debug to true, then queue build and release)starian chen-MSFT
Based on the update, the package name is 270.zip, but Beastmuffn.web.zip is in the azure app service, how do you publish web app to package? On the other hand, core 2.0 app is supported by Deploy Azure App Service.starian chen-MSFT

1 Answers

0
votes

This issue was resolved out on GitHub (github.com/Microsoft/vsts-tasks/issues/5111).

In a nutshell, the new Build step "dotnet publish" (under preview as I write this) allows you to zip up the artifacts.

However, I already had the old "archive files" build step that I never removed from the previous build definition for ASP.NET MVC Core 1.1.

So, the result was the build was zipping up the zipped publish. During release, the publish was unzipped once, leaving the inner zip file unzipped as it moved it to the Azure website destination.