Thanks Ivan for your answer.

Do you think I could "hide" this syntax " kubernetes { ..." or this "docker 
{ ..." behind a label ?

A label represent a slave declared in Jenkins. But in my case I did'nt 
declare slaves directly. For one of my Jenkins master I just declared a 
Kubernetes cluster.


Le vendredi 14 février 2020 19:58:51 UTC+1, Ivan Fernandez Calvo a écrit :
>
> 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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/8a4c146d-2962-43b9-8af6-231cd4a58905%40googlegroups.com.

Reply via email to