Re: Pipeline generic for two Jenkins with two different agent types

2020-02-16 Thread Iván Fernández Calvo
> 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

Re: Pipeline generic for two Jenkins with two different agent types

2020-02-16 Thread Georges Moulinier
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.

Re: Pipeline generic for two Jenkins with two different agent types

2020-02-14 Thread Ivan Fernandez Calvo
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

Re: Pipeline generic for two Jenkins with two different agent types

2020-02-14 Thread Georges Moulinier
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

Pipeline generic for two Jenkins with two different agent types

2020-02-06 Thread Georges Moulinier
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