Create resource group (Only run it one time)
az group create –name “JACKY-RG-TEST” –location “westus”Create App Service Plan (Only run it one time)
az appservice plan create –name “jacky-test” –resource-group “JACKY-RG-TEST” –sku S1 –is-linuxCreate Web app (Only run it one time)
az webapp create –resource-group “JACKY-RG-TEST” –plan “jacky-test” –name “jacky-jacky2” –runtime “PYTHON|3.6”Set application settings SCM_DO_BUILD_DURING_DEPLOYMENT=true
az webapp config appsettings set -g “JACKY-RG-TEST” -n “jacky-test” –settings SCM_DO_BUILD_DURING_DEPLOYMENT=trueDeploy a ZIP file to the webapp
az webapp deployment source config-zip –resource-group “JACKY-RG-TEST” –name “jacky-jacky2” –src “C:\temp\application.zip”Modfiy codes and redeploy a zip to the same webapp
az webapp deployment source config-zip –resource-group “JACKY-RG-TEST” –name “jacky-jacky2” –src “C:\temp\applicationv2.zip”Create staging slot
az webapp deployment slot create –name “jacky-jacky2” –resource-group “JACKY-RG-TEST” –slot “staging” –configuration-source “jacky-jacky2”Modify codes and deploy it to “staging” slot
az webapp deployment source config-zip –resource-group “JACKY-RG-TEST” –name “jacky-jacky2” –slot “staging” –src “C:\temp\applicationv3.zip”After testing. Swap staging to production
az webapp deployment slot swap -g “JACKY-RG-TEST” -n “jacky-jacky2” –slot staging –target-slot production
You can integrate those commands into your CD tools.
HTH. 2020-June-28 by Jacky