1

I am using jenkins multijob plugin to build my projects and deploy builds. Currently the structure is below

Multi Job Project 
  Build Phase  
    Project A
    **Project B**
    Project C
  Deploy Phase
    Project D

Each project is configured with git SCM & when I build Multijob project, It builds correctly.

I want to trigger Multijob project build on github push event on project B.

Taha Iqbal
  • 41
  • 1
  • 4

1 Answers1

1

Update 1:

Basically you need to add Project B repository as a submodule in your Project A repository.

More info : https://git-scm.com/book/en/v2/Git-Tools-Submodules

A handy command to do this : git submodule add git://github.com/username/project.git

More info on this matter here : how to trigger build in jenkins when changes committed to submodule?

Also : How to configure Git post commit hook

Main Answer:

Basically you have to configure "Webhooks and Services" in the github repository of Project B.

"Webhooks and Services Configuration snapshot"

  1. This tutorial might help you: (specifically the portion of the tutorial where github project is configured)

    https://learning-continuous-deployment.github.io/jenkins/github/2015/04/17/github-jenkins/

  2. This stackoverflow answer is also helpful:

    Jenkins-Build when a change is pushed to GitHub option is not working

  3. This four kitchens tutorial covers Jenkins and Github private repo integration and push event triggers.

    http://fourkitchens.com/blog/article/trigger-jenkins-builds-pushing-github

General Grievance
  • 4,555
  • 31
  • 31
  • 45
Muhammad Shahab
  • 4,187
  • 4
  • 34
  • 44
  • I have already configured these. The main thing is to trigger build on main project whenever there is a change in sub project. – Taha Iqbal Apr 05 '16 at 08:58
  • Shahab, no project is nested inside any project. Multijob project is parallel to jenkins freestyle project, in which you create a project having multiple phases. – Taha Iqbal Apr 05 '16 at 12:48