You can detect what Jenkins master is running the pipeline by checking the 
environment bar JENKINS_URL , agent labels accept variables, so a simple way 
can be use the JENKINS_URL in the labels some thing like

agent { label “${JENKINS_URL} && linux”}

If JENKINS_URL is ‘http:// intance1.example.com’ Itwill take an agent defined 
with the label http:// intance1.example.com and linux

-- 
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/0e9a41ec-3f34-450a-a24b-42b5a506a9b0%40googlegroups.com.

Reply via email to