How to get the IP Address for Azure DevOps Hosted

2019-03-30 10:51发布

Is there a way to the IP address range for the hosted machine running?

This is related to the Release Pipeline -> Hosted agent.

Issue: Getting access denied on connection, as the connection is getting refused via Firewall. Need to whitelist the IP address range for this request coming from release pipeline on DevOps.

3条回答
狗以群分
2楼-- · 2019-03-30 11:03

Use a script step in the pipeline to get the current external ip and whitelist it. after pipeline finishes use another script step to clean up.

Thats the only way (for hosted agent), unfortunately.

查看更多
Emotional °昔
3楼-- · 2019-03-30 11:20

I have a step in a release that gets the Hosted Agent IP address in powershell with:

Invoke-RestMethod http://ipinfo.io/json | Select -exp ip
Hope that helps.
查看更多
够拽才男人
4楼-- · 2019-03-30 11:28

We need to white list the IP address used by the Azure Datacenters in the list mentioned below: https://www.microsoft.com/en-nz/download/details.aspx?id=41653

Note: This list gets updated every week, so please be mindful of this during the deployment planning

查看更多
登录 后发表回答