简体   繁体   中英

Change configuration on azure website when using GIT to deploy

How do I configure my website to use either test or release configuration when I'm deploying using GIT? I can configure the branch I want to use, but the the build configuration.

The best way to do this is to use a custom deployment script, as described in this post .

Once you do that, you have a lot more control over how your app is built. In this case, you can just tweak the msbuild command like it runs to use whatever configuration you want, much like you'd do if you ran msbuild on your local machine.

You can now add an app setting for this on the configure page instead of going to the trouble of a custom deploy script.

SCM_BUILD_ARGS -p:Configuration=[CONFIGURATION_VALUE]

eg

[KEY] SCM_BUILD_ARGS

[VALUE] -p:Configuration=QA

https://github.com/projectkudu/kudu/wiki/Configurable-settings

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM