Search code examples
azureazure-pipelinespipeline

Azure Generic Service Connection to on-prem server


I need to trigger an on-prem api after my Azure release pipeline successfully finished. I saw that Azure Post Deployment Gates are exactly meant for that.

Issue I face is that I need to create a Generic Service Connection to my on-prem server from DevOps server. I do not know if that is possible security wise. All the cases found on internet were related to deployed APIs over the internet and not only available within someone's organization.

Could you please share if that is still possible to do?

https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/http-rest-api?view=azure-devops


Solution

  • The API needs to be internet-facing for post-deployment gates to be able to resolve and call it.

    The workaround is to run it as a final step in your pipeline, assuming you run your pipeline on an on-prem agent that has a network route to the API in question. However, you miss out on the asynchronous and retryable nature of the post-deployment gate -- it will call the API once and only once.