Enclosing a 'build' step in a node can be roughly equivalent to enclosing 
an ssh command in the node. That ssh command is kicking off some external 
process. The build step is kicking off an external process. This seems like 
completely normal behavior to me. The jobs are not related to each other in 
any way, and they have their own configuration about which nodes they want 
to run on. It doesn't make sense to expect to independent jobs to have some 
kind of coupling like that. 

Can you give some examples of how the node block does not define the node 
properly for any internally executed steps? I have never seen any steps run 
on the wrong node.

On Monday, October 23, 2017 at 10:33:35 AM UTC-6, Steve Turner wrote:
>
> I wouldn't call that behavior "normal".  I'm new to Jenkins pipelines and 
> Groovy scripting, and this has been the single most maddening thing to 
> overcome in my attempts to learn the environment.  On what planet does it 
> make sense that enclosing something in a node block, where the only 
> argument is a node label, and where the block is enclosed in {} braces 
> (which defines an isolated "scope" in every other language I can think of) 
> does not cause the label to become used as the default for everything 
> defined therein?  The backflips you have to go through to overcome this are 
> ridiculous.  I find both the "node" and "agent" constructs as implemented 
> by the Jenkins pipeline mechanism to be completely useless.
>
> On Wednesday, December 14, 2016 at 6:42:09 AM UTC-6, mpapo - Michael 
> Pailloncy wrote:
>>
>> IIUC, it's a normal behaviour.
>>
>> The "build" pipeline step triggers the job job1 without any node 
>> "context" (a bit like if you trigger it manually), so the default label of 
>> job1 is used in this case. 
>>
>>

-- 
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/b3e2f1e7-1e28-4d63-a7c9-b225b8d154a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to