Panikera Raj, I think your have the nomenclature confused. *Master* is the main server where Jenkins runs, which you access by http/https, and *slaves* are the servers to which the Jenkins master delegates the builds to run.
*Upstream* is the job/build which triggers another job/build, and *downstream* is the job which was triggered by an upstream job/build. Do you want to find out the master's hostname, or the upstream job's name? HTH, Daniel Serodio On Wednesday, October 15, 2014 8:15:49 AM UTC-3, Corneil du Plessis wrote: > > A different question would be, why do you have multiple masters and why is > it difficult to distinguish the slave activity? > > I would use different users profiles for the masters and will be able to > distinguish activity that way. > On 15 Oct 2014 11:31 AM, <[email protected] <javascript:>> wrote: > >> Now I’m really confused. You said: >> >> In slave logs it's printing as below. >> >> Started by upstream project "Iphone7.4Auto >> <http://192.168.2.28:8080/job/Iphone7.4Auto/>" build number 1527 >> <http://192.168.2.28:8080/job/Iphone7.4Auto/1527> >> >> originally caused by: >> >> Started by upstream project "Iphone7.10Auto >> <http://192.168.2.28:8080/job/Iphone7.10Auto/>" build number 212 >> <http://192.168.2.28:8080/job/Iphone7.10Auto/212> >> >> originally caused by: >> >> >> >> Isn’t that what you are asking for? >> >> >> >> >> >> *From:* Panikera Raj [mailto:[email protected] <javascript:>] >> *Sent:* 15 October 2014 10:07 >> *To:* [email protected] <javascript:> >> *Subject:* Re: Can we print Master name in slave machine >> >> >> >> Hi Matthew, >> >> Thanks for quick help, >> >> Ok can we print name of job, name of an upstream job? >> >> >> >> Regards, >> >> Panikera >> >> >> >> On Wed, Oct 15, 2014 at 2:24 PM, <[email protected] <javascript:>> >> wrote: >> >> I’m quite confused about what it is exactly you are asking for. Are you >> asking for the name of the master machine, or the name of a job, or the >> name of an upstream job? >> >> When you say “I need to find out who is running”, what do you mean? Does >> you project need to find out its own name? >> >> Can you answer my previous question: “When you say you want to print the >> “master name”, what exactly do you want to print?” Provide some sample >> output. >> >> >> >> >> >> *From:* Panikera Raj [mailto:[email protected] <javascript:>] >> *Sent:* 15 October 2014 09:43 >> >> >> *To:* [email protected] <javascript:> >> *Subject:* Re: Can we print Master name in slave machine >> >> >> >> HI All, >> >> Thanks to one and all for responding on this. >> >> In slave logs it's printing as below. >> >> Started by upstream project "Iphone7.4Auto >> <http://192.168.2.28:8080/job/Iphone7.4Auto/>" build number 1527 >> <http://192.168.2.28:8080/job/Iphone7.4Auto/1527> >> >> originally caused by: >> >> Started by upstream project "Iphone7.10Auto >> <http://192.168.2.28:8080/job/Iphone7.10Auto/>" build number 212 >> <http://192.168.2.28:8080/job/Iphone7.10Auto/212> >> >> originally caused by: >> >> Here *Iphone7.4Auto* , *Iphone7.10Auto* are Master project names >> >> My concern is when those two masters are executing on slave, I need to >> find out every time who is running. I am using shell script to get build >> generate. Is there a way where I can print master name in Shell Script >> >> Regards, >> >> Panikera >> >> >> >> >> >> On Tue, Oct 14, 2014 at 5:19 PM, Eric Engel <[email protected] <javascript:>> >> wrote: >> >> You could print the environment variable JENKINS_URL in a pre-build step. >> The JENKINS_URL contains at least the domain name of the master, which then >> may be parsed for further use. >> >> >> >> Regards >> >> Eric >> >> >> >> *Von:* [email protected] <javascript:> [mailto: >> [email protected] <javascript:>] *Im Auftrag von *Laurent >> Malvert >> *Gesendet:* Dienstag, 14. Oktober 2014 12:58 >> *An:* [email protected] <javascript:> >> *Betreff:* Re: Can we print Master name in slave machine >> >> >> >> From Rajashekar's last message, I suppose he wants to see in the build >> console/log on what node the current building is running, and also to which >> master this particular node is connected. >> >> I don't quite understand why one would need this, but I suppose if you >> have a swarm of nodes that may connect to several servers it could be >> helpful. >> >> >> >> No idea on a way to do this though. >> >> >> >> On Tue, Oct 14, 2014 at 12:21 PM, <[email protected] <javascript:>> >> wrote: >> >> When you say you want to print the “master name”, what exactly do you >> want to print? And where / when do you want to print it? >> >> I don’t understand what you are trying to achieve here – can you explain >> in more detail? >> >> >> >> *From:* Panikera Raj [mailto:[email protected] <javascript:>] >> *Sent:* 14 October 2014 11:02 >> *To:* [email protected] <javascript:> >> *Subject:* Re: Can we print Master name in slave machine >> >> >> >> Hi All, >> >> Any update on this... >> >> here is senario: >> >> Started by upstream project "Iphone7.4Auto >> <http://192.168.2.28:8080/job/Iphone7.4Auto/>" build number 1527 >> <http://192.168.2.28:8080/job/Iphone7.4Auto/1527> >> >> originally caused by: >> >> Started by upstream project "Iphone7.10Auto >> <http://192.168.2.28:8080/job/Iphone7.10Auto/>" build number 212 >> <http://192.168.2.28:8080/job/Iphone7.10Auto/212> >> >> originally caused by: >> >> >> >> I want print master name >> >> >> Regards, >> >> Rajashekar P >> >> >> >> >> >> >> >> >> >> On Fri, Oct 10, 2014 at 12:31 PM, Panikera Raj <[email protected] >> <javascript:>> wrote: >> >> Hi All, >> >> Is there a way, where I can print Master name in slave machine. Since Two >> master projects will trigger one slave project. >> >> Please help me on this. >> >> Regards, >> Rajashekar P >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> >> >> >> >> >> -- >> Laurent Malvert >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
