MicrosoftLearning / AZ400-DesigningandImplementingMicrosoftDevOpsSolutions

AZ-400 Course Repository for Labs and Demos.
https://microsoftlearning.github.io/AZ400-DesigningandImplementingMicrosoftDevOpsSolutions/
MIT License
518 stars 963 forks source link

Updated Module 09: Implement continuous feedback (Lab 16), to set the needed Web App Configuration settings #558

Closed theDiverDK closed 4 months ago

theDiverDK commented 4 months ago

LAB16: Add description for adding Web App configuration settings

Related Issue

Link related Github Issue 🢂 #108

Checklist

Mark completed with "x" between brackets, "[x]", or checking the box once the PR is created:

Changes proposed in this pull request: In order to get Module 09 Lab 16, to work, 2 Web App Configuration App Settings have to be added. I have tried to write a proposal to the lab guide to inform the student about how to do it.

theDiverDK commented 4 months ago

Hmm just noticed, that the deploy now fails, when I run it a second time, because the settings are already created.

Which confuses me, the description for the 'AzureAppServiceSettings@1' task says: Updates or adds app service settings in an Azure Web App for Linux or Windows.

It looks like it can't update, since it now fails ?

rob-foulkrod commented 4 months ago

I appreciate the contribution. For consistency with the other exercises and because we have experienced successful redeployments (where this solution had difficulty), we will update the instructions to update the AzureRmWebAppDeployment@4 task to include the appsettings statement so it looks like this:

    - task: AzureRmWebAppDeployment@4
      inputs:
        ConnectionType: 'AzureRM'
        azureSubscription: '<Subscription>'
        appType: 'webApp'
        WebAppName: 'az400eshoponweb177112039'
        packageForLinux: '$(Build.ArtifactStagingDirectory)/**/Web.zip'
        AppSettings: '-UseOnlyInMemoryDatabase true -ASPNETCORE_ENVIRONMENT Development'

I will close this pull request and create one to replace it.

theDiverDK commented 4 months ago

Hi @rob-foulkrod

No problem at all :)

Your solution is of course way better than mine.

I am happy when the Labs work as they should, it makes my life as a MCT easier :-)

LuizMacedo commented 4 months ago

Thanks @theDiverDK improving our labs quality! That's the idea, having the labs working as it should and make your life easier. @rob-foulkrod thank you so much for your PR, it fixed the issue!