简体   繁体   中英

github webhook to trigger job on multiple jenkins server

My scenario:

  • Single github repo
  • 4 files in the repo
  • 4 jenkins server

Desired outcome:

  • pushing changes in file A, should trigger job in jenkins server A, pushing changes in file B, should trigger job in jenkins server B and so on.

Is there any solution for this?

Depending where your repository is hosted (github, gitlab, bitbucket) you might be able to use a pipeline within the repository to look for the changed files and trigger a webhook on the correct server accordingly.

Another approach could be to always trigger a special job on server A which then looks for changed files and triggers the correct job on the right server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM