| "Jenkins URL" in the configuration. In a CI job, this is visible via the shell variable JENKINS_URL. All fine and nice. Now I can get the list of nodes in CI using /usr/bin/wget --auth-no-challenge --no-proxy "http://system1.domain:9999//computer/api/xml?xpath=*/computer/displayName&wrapper=foo" -O "/tmp/Ymy2V19UpB" "Unfortunately" for the master, this just returns "master". So, how can I retrieve the hostname of the master ? (When the call is not done in a CI job - I need this for administration from "outside") I either seem to need JENKINS_URL or a way to get the full hostname of the master. Because of the port forwarder, a script doesn't know if Jenkins is running on 'system1' or 'system2', so the URL used in "wget" above, doesn't help. How can I get that ? I've searched the Web, the REST API and the CLI-interface (using jenkins-cli.jar) in vain. Regards Martin We use this approach, because we swap the physical machine on Jenkins core updates, to keep the old state for some time for a possibly needed fallback. To the users we "hide" this via the port forwarder, so they don't need the current physical name. This way URLs like e.g. on mails from CI stay valid. |
Jenkins instances listen on UDP port 33848. Whenever a UDP packet is received, it will respond with a short XML fragment that shows the connection information. This XML has the following format:
<hudson> <version>1.380</version> <!-- version of Jenkins --> <url>http://somewhere/jenkins/</url> <!-- HTTP URL. Not available if not configured --> <slave-port>12345</slave-port> <!-- if TCP slave listener port is configured, its number --> </hudson>
By using this, a client can use a UDP broadcast to try to discover nearby Jenkins instances. This is primarily useful for Swarm Plugin.
--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/FvmbmFkofpc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/96fb7ae8-81fc-43d7-9583-1f98558806fb%40googlegroups.com.