Azure WebApp Deployment Slot: Pre-Swap Job -


hy

we have 2 app services:

  • restservice (azure app service web app -> asp.net)

  • webapplication (azure app service web app -> angular.js spa)

the restservice has web.config , webapplication appconfig.json configuration-file.

on each app service have staging-slot, tests (auto , manual). reason, need have sticky-slot settings web.config , appconfig.json file. sticky-slot settings portal, think not possible (these settings apply appsettings-configurations in web.config think).

what best way that?

i think of that: - in release-configuration deploy web-apps staging slots , modifying (adjust settings staging-environment) on web.config , appjson.config in task (power-shell or similar)...then can auto-tests, if succeed undo changes in config-files , swap production. is, if want manual tests , swapping in portal? have undo of changes myself...

is there maybe pre-swap job, trigger before swapping?

thanks help,

peter

as know, easy if store settings in web.config. need select "slot setting" in azure portal. if want swap job before swapping, suggest use microsoft.windowsazure.management.websites, following code swap slots.

var cert = new x509certificate2(); cert.import(convert.frombase64string("miidbjccae6gawibagiqbafn9sasqofhelar.....")); var _client = new microsoft.windowsazure.management.websites.websitemanagementclient(new microsoft.windowsazure.certificatecloudcredentials("***", cert)); //do somethings..... client.websites.swapslots("<web space>", "<website name>", "<source slot name>", "<target slot name>"); 

Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -