Re: [workflow-plugin] How can I get the hostname of the parent node

2015-06-16 Thread Jesse Glick
On Monday, March 30, 2015 at 7:36:23 AM UTC-4, Clifford Sanders wrote:
>
> I could write the hostname to a file and archive/unarchive it to read the 
> hostname from there.
>

readFile 

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5d4cc1e4-1e4d-4ef1-a291-c99bf531c8ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [workflow-plugin] How can I get the hostname of the parent node

2015-03-30 Thread Baptiste Mathus
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 :

> 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 jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/8ee30fa8-295d-4892-96d5-0e7edd17b166%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Baptiste  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 jenkinsci-users+unsubscr...@googlegroups.com.
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.


[workflow-plugin] How can I get the hostname of the parent node

2015-03-30 Thread Clifford Sanders
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/8ee30fa8-295d-4892-96d5-0e7edd17b166%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.