Hi Kris,

Thank for your help but, I am expecting to configure two jenkins instances
in one jenkinsfile.

As Doneer suggested, it would be good to implement but in my org, they have
already implemented. Not sure how did they implement
it.

On Thu, 10 Aug 2023 at 10:30 PM, Kris Stern <krisst...@outlook.com> wrote:

> Hi Ashok,
>
> I am guessing you are looking for the following, but am not sure...
>
> You can try something like the below:
>
> java -DJENKINS_HOME=/path-to-jenkins1 -jar jenkins.war --httpPort=8080
> java -DJENKINS_HOME=/path-to-jenkins2 -jar jenkins.war --httpPort=8081
>
> Something like this, so one instance can be reached at port 8080 and the
> other one at port 8081.
>
> Best,
> Kris
>
> ------------------------------
> *From:* jenkinsci-users@googlegroups.com <jenkinsci-users@googlegroups.com>
> on behalf of Ashok Reddy <ashokrd...@gmail.com>
> *Sent:* 10 August 2023 22:25
> *To:* jenkinsci-users@googlegroups.com <jenkinsci-users@googlegroups.com>
> *Subject:* Re: Regarding two jenkins jobs
>
>
> Hi Kris,
>
> Yes , two jenkins instances
> On Thu, 10 Aug 2023 at 9:54 PM, 'Björn Pedersen' via Jenkins Users <
> jenkinsci-users@googlegroups.com> wrote:
>
>
>
> ashok...@gmail.com schrieb am Donnerstag, 10. August 2023 um 03:54:11
> UTC+2:
>
> Hi All,
>
> How to configure jenkinsfile if one job is in one jenkins instance and
> another job is in another jenkins instance?
>
>
> I you really mean 2 jenkins instances (not different agents):
>
> * don't use a single Jenkinsfile, instead configure the jobs (at least on
> one instance) to  use another name (e.g. jenkinsfile.host).
> * or  switch execution based on the HUDSON_URL variable (this gives the
> main jenkins URL), although this most likely will make the jenkinsfile
> quite unreadable.
>
>
> --
> 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/7c6eee8d-3526-41cf-a758-f0f32523dd8an%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/7c6eee8d-3526-41cf-a758-f0f32523dd8an%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> --
> 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/CAKRLcHhxb4uK2uAwkuUKqPG7N%3DpBzsyHkg3nLEMOFtQxJMZfxQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CAKRLcHhxb4uK2uAwkuUKqPG7N%3DpBzsyHkg3nLEMOFtQxJMZfxQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> --
> 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/OS3P286MB1431FE7694ADADDC290132ADA113A%40OS3P286MB1431.JPNP286.PROD.OUTLOOK.COM
> <https://groups.google.com/d/msgid/jenkinsci-users/OS3P286MB1431FE7694ADADDC290132ADA113A%40OS3P286MB1431.JPNP286.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAKRLcHhVuoe4aV8%3Dj4O25q%2BEpdvUeaYtvfWN2VMvaSGQJn5h0Q%40mail.gmail.com.

Reply via email to