> El 16 feb 2020, a las 11:15, Georges Moulinier
> escribió:
>
> Do you think I could "hide" this syntax " kubernetes { ..." or this "docker {
> ..." behind a label ?
On both plugins you can configure templates , those templates can be triggered
by labels so you still can use the agent { la
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.
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.c
Does anyone have an idea ?
Le jeudi 6 février 2020 14:00:50 UTC+1, Georges Moulinier a écrit :
>
> Hi !
>
>
>
> I want to know how can I use different agent type in my pipeline in
> function of the Jenkins master executing it ?
>
>
>
> There are two Jenkins master target :
>
> One is using a
Hi !
I want to know how can I use different agent type in my pipeline in
function of the Jenkins master executing it ?
There are two Jenkins master target :
One is using a kubernetes cluster for providing agent containers : agent {
kubernetes { ...
One is using a docker agent : agent