1
votes

I hope someone is able to guide me in the right direction.

I am trying to implement the following:

Event Grid -> Function App -> Storage Account

I am also trying to implement the above through ARM templates and Azure DevOps deployment, but I am a bit confused on how to add the Event Grid Bindings to my Function App (.Net) code Files in Azure Repos.

I know in the documentation it says that i need to install the Microsoft.Azure.WebJobs.Extensions.EventGrid" NuGet package, but how is this done through Azure DevOps?

Currently my Release Pipelines are set up as follows:

1) Deploy Function App, Storage Account, Event Grid 2) Deploy Function App Code 3) Get Master Key of function app 4) Create Event Grid Subscription.

Tasks 1-3 execute correctly, but (4) fails with "URL endpoint validation failed" - which im guessing is because I havent installed Microsoft.Azure.WebJobs.Extensions.EventGrid packages correctly in my functions files in Azure repos. When i set everything up manually and install the Event Grid trigger in the portal, I can easily create the Event Grid Subscription without issues.

How do I 'install' Event Grid Trigger NuGet Packages in Azure DevOps if my Function App code is in Azure Repos?

Much Appreciated.

1
looks like it was answered here: stackoverflow.com/questions/52703296/… - Mike Urnun MSFT

1 Answers

1
votes

I know in the documentation it says that i need to install the Microsoft.Azure.WebJobs.Extensions.EventGrid" NuGet package, but how is this done through Azure DevOps?

Just as answered in this thread, you need to add a dotnet restore task to restore the package and a .NET Core build task to build the extensions project before archive files.

Besides, we can install and use Event Grid Subscription Extension to create and modify event grid subscriptions in Azure DevOps pipeline.

Below blogs for your reference, hope that helps :