
To call a Azure Function from Azure DevOps, we need to add a new agentless phase to our release definitionĪgentless phase can contain a Azure Function call which has only two mandatory settings. With issue service we can iterate all the tickets we want to by providing Youtrack query as a string parameter:įoreach(var issue in await issueService.GetIssues(“State: Call Azure Function from Azure DevOps Var connection = newBearerTokenConnection(“”,”perm:…”) var issueService = connection.CreateIssuesService() Create permanent token from YoutrackĬonnection to Youtrack is done with BearerTokenConnection class, with this class we can use permanent token to login into Youtrack and it’s a much better way than using our own user-name and password (which we don’t want to check in into version control).įrom Youtrack, click Update personal… link from own profile page to get into authentication pageįrom Authentication page, switch to Authencation tab and click New token… buttonĪfter creating a connection with BearerTokenConnection we can call CreateIssueService method to retrieve a service which provides methods to update, delete and create new tickets. YouTrackSharp simplifies integration with Youtrack greatly, so I suggest it over the basic REST calls. Add YouTrackSharp package into “project”. It’s a much faster way to implement REST calls than by coding them manually.įirst create new Azure Function 2.0 from Visual Studio Code (use extensions). YouTrackSharp provides some very easy to use functions to interact with Youtrack REST API. Add Newtonsoft.Json version 10.2 Nuget package and YouTrackSharp package (which requires at least version 10 from Newtonsoft.Json). By default Azure Function refers Newtonsoft.Json 9.0, which is too old version for our use. Create new Azure Functionįirst create an new Azure Function project (from Visual Studio) which provides basic building blocks for our integration. Azure DevOps has a “native” support for azure functions, so linking Azure DevOps into azure function and implementing small function we can easily integrate these two great tools. However Youtrack has a very easy to use REST API which can used to build custom integration.Īzure DevOps doesn’t also provide any tools to integrate with Youtrack either, so to update tickets from Azure DevOps, we need to use the REST API. Bad part is, that it currently doesn’t have any support for Azure DevOps, so if you would like to update tickets from Azure DevOps it doesn’t provide any out of the box solution. These two features makes it a great tool for customer issue reporting. It’s light weight and has very intuitive UI.
