简体   繁体   中英

How to modify function.json when deploying Azure Function from Azure DevOps release pipeline?

I have managed to create build and release pipelines for my v1.x Azure Function and it is working. But now I have a problem with function.json file. I have three environments (development, test and production) with different triggers. So I need to modify function.json for each environment. How can I modify function.json in Azure DevOps' release pipeline? Now I have to modify it manually after each release.

I resolved this with JSON variable substitution in release pipeline's Azure App Service Deploy task.

[ 1]

Then put appropriate variables to put wanted values to function.json, for example topic for Azure Service Bus trigger: bindings.0.topicName = MyTopic

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