1

I have configured individual jenkins jobs for each project. in my case, whenever there is a commit, all the jobs are getting triggered. how do I make sure only that job pertinent to the project runs and creates the deployable artifacts.

Cœur
  • 37,241
  • 25
  • 195
  • 267
ramesh.metta
  • 139
  • 1
  • 1
  • 11
  • Is this related in some way to the tag [ibm-integration-bus]? – JoshMc Jan 18 '19 at 19:12
  • yes Josh. Im automating ibm jntegration bus deployment. i have multiple projects in one branch enterprise git repository. i would like to checkout only specific projects that has change in a branch and build bar file for it. – ramesh.metta Jan 18 '19 at 19:15
  • i deleted the tag now to not confuse readers :-) – ramesh.metta Jan 18 '19 at 19:16
  • Thank you, that sounds good as it does not seem that the fact you are building bars for IIB are a part of the problem you seek to solve :) – JoshMc Jan 18 '19 at 21:41

1 Answers1

1

What URL have you configured in GIT repo? Does it contain repo name? Does each project has it's own repository?

When you call curl http://yourserver/jenkins/git/notifyCommit?url=<URL of the Git repository> jenkins will scan all the jobs that are configured to check out the specified URL. Do you have multiple jobs using the same repository?

You can try to use build triggers - you will be able to invoke a job by its name. enter image description here

Irek L.
  • 316
  • 1
  • 6
  • hi irek. we have single repository with multiple projects. As you said, i used same curl with url of the git repository and im able to checkout the latest changes to workspace. majn challenge is i would like to identify the actual project that has changes and trigger that specific job. :-) – ramesh.metta Jan 18 '19 at 23:18
  • i tried giving individual branch/projectname but git plugin not able to identify the branch. – ramesh.metta Jan 18 '19 at 23:19