0
votes

I have one solution in Visual Studio which is being deployed as a webjob onto the Azure AppService. This is done manually and the same solution is deployed multiple times with different names for the webjob. The webjob is a trigerred one and internally specific functions are performed based on the arguments passed during the trigger. This needs to be achieved via release pipeline now. We are able to deploy the webjob through pipeline but the webjob name is static right now since the value is picked up from webjob-publish-settings.json of my checked in code. How to modify the name of the webjob during deployment?

2
Any update for this case?Levi Lu-MSFT

2 Answers

0
votes

You'll likely want to make use of release variables. These will let you specify release-time defined values for a variety of different things in a release pipeline.

You can define variables in the Variables tab when editing your pipeline. If you have multiple stages in your pipeline, you can also specify on that page whether a particular value should be used in all of them, or needs to differ by stage.

There are also a good deal of predefined variables you can make use of as well.

When using them, simply wrap them in a $(). Assuming you create a variable named MyAppName, this would look something like this:

DevOps App Service name

Hope that helps!

0
votes

There is a Set Json Property task might help to do this. This task can update a specific json object's property with a specified value.

You can try adding a Set Json Propertytask before azure Azure App Service Deploy task. And update webJobName value in webjob-publish-settings.json. Check here for how to use this task

enter image description here