'Jenkins - How to trigger QA tests job build by changes on another git project

I know this is a frequent topic, but I couldn't find a straight-forward answer for my case. I just started with Jenkins, so I need help to achieve the setup described below.

I have:

  • One maven job that is sourced from GIT repo and is executing my QA tests. (let's call it #QAjob)
  • then...
  • One project on BITBUCKET which is the website project (#WEBproject)
  • Another Android/IOS project that is being built on the APP CENTER (#MOBILEproject)

I want to achieve the following behavior on Jenkins:

  • When somebody pushed to BITBUCKET #WEBproject on the STAGING branch - I want to start #QAjob
  • When somebody's started build on APP CENTER has completed on STAGING branch - I want to start #QAjob

I've set up my #QAjob, it pulls my tests code from GIT and executes the tests correctly. So I just need to set up these triggers when the job will get executed. I figured out that there are webhooks on BITBUCKET and APP CENTER that can ping a job when the push was done, but I don't know how to use it to accomplish the described setup.



Solution 1:[1]

Actually, I found the answer by myself and would like to share it in case somebody else got stuck with a similar case.

Solution is Jenkins plugin - generic-webhook-trigger

Detailed instructions can be found here - Jenkins – How to build a specific branch on Bitbucket

Instructions for BitBucket can be used for AppCenter as well, there are just differences in JSON path expressions for variables.

If somebody needs help, feel free to add a comment.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 BlueDev