0

say I have 2 jenkins (jenkins1, jenkins2) in which this repo, repoA is only in jenkins1

So under the Settings in Stash, the options Stash Webhook to Jenkins is already embedded with all the necessary information with the Jenkins URL pointing towards to jenkins1.

And so, is it possible to add another URL (jenkins2 in this case) towards the webhook? Say if it is possible, will it have any complications since the repo is not in jenkins2 ?

dissidia
  • 1,531
  • 3
  • 23
  • 53
  • what is the purpose of this jenkins2 if you do not wish to link it to the repo? – Megha Aug 20 '15 at 05:30
  • cause the said repo is already in jenkins1 (which is like the main server etc)? but when you mention linking, jenkins2 to the repo, say if i did that and it is indeed possible... is a second url possible to be added in too? Pardon my lack of understanding in such areas – dissidia Aug 20 '15 at 06:08
  • Do you mean u wish to use Jenkins one as a master and jenkins 2 as a slave? – Megha Aug 20 '15 at 06:12
  • yes, probably something of that sort – dissidia Aug 20 '15 at 06:14
  • I am little bit confused with Jenkins pointing to Jenkins? – Megha Aug 20 '15 at 06:27
  • jenkins2 pointing to jenkins1 – dissidia Aug 20 '15 at 06:28
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/87462/discussion-between-dissidia-and-meghaa). – dissidia Aug 20 '15 at 09:22

2 Answers2

0

You can make Jenkins 2 point to Jenkins 1 but I dont think Jenkins 2 can access the repo via Jenkins1. Ofcourse Jenkins 2 can trigger a job on Jenkins1 to access the repo. One drawback could be that the resource is not evenyl distributed since Jenkins1 does all the heavy lifting but if its designed to be the master than I guess thats expected. here is something on stackoverflow that might help you..check it out

How do I trigger another job from hudson as a pre-build step?

Community
  • 1
  • 1
Megha
  • 220
  • 2
  • 13
  • Hey, I did chanced upon the plugin... And its similar plugin on remote too. Not very sure if it will helps in my cause, but thanks for putting up the info. But can i presume that in each stash, you can only attach 1 repo url under the Stash Webhook to Jenkins? – dissidia Aug 20 '15 at 07:00
  • one jenkins server can access multiple repos – Megha Aug 20 '15 at 07:39
0

With the Http Request Post Receive Hook plugin, you can trigger several Jenkins build URL:

enter image description here

Bruno Lavit
  • 10,184
  • 2
  • 32
  • 38