Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Pull Active Node IP's as Variable #4551

tscholl ·

Is there a way to pull the IPs of the active nodes from the grid, maybe filtered by user attributes, and pull them into a job?

  • replies 3
  • views 220
  • stars 0
robinshen ADMIN ·

This can be achieved with below groovy script:

groovy:
def ips = "";
for (agent in system.agentManager.buildAgents)
  ips += " " + agent.ip

return ips;

Please note that this script needs to be run on server

tscholl ·

Thank you, would it be possible to filter based on the user attributes or do I need to pull the full list and then grep for the agents I need?

robinshen ADMIN ·

You will need to filter it by checking value of agent.getAttribute("attribute_name");