currentBuild.getBuiltOn(), at least as a starting point? (Though I didn't check if this is actually an AbstractBuild instance which is passed)
Cheers 2015-03-30 13:36 GMT+02:00 Clifford Sanders <[email protected]>: > In the following workflow I need to get the hostname of the parent node. > > node('clifford') { > > sh "sh create-modules-list.sh > modules.txt" > > } > > def branches = [:] > branches["build1"] = { > node('clifford') { > ws { > sh "ssh build@${PARENT_HOST} 'bash -s' < get-next-module.sh > /var/lib/build/workspace/test-workflow/modules.txt 2>&1" > } > } > } > > Is it possible to pass the hostname as parameter? > > I could write the hostname to a file and archive/unarchive it to read the > hostname from there. But maybe there is an easier way? > > Thanks > > Clifford > > -- > 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]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/8ee30fa8-295d-4892-96d5-0e7edd17b166%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/8ee30fa8-295d-4892-96d5-0e7edd17b166%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Baptiste <Batmat> MATHUS - http://batmat.net Sauvez un arbre, Mangez un castor ! -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS6wmdRdSn3bQnsmWU1mU-pU7TtLqafc9RGJr%2B%2BniJxGLA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
