Trigger Jenkins tests after commits in git submodules

痴心易碎 提交于 2019-12-08 01:49:12

问题


I have a super project that only aggregates multiple git sumodules. I would like to trigger Jenkins for each change in submodules as well as when super project is updated.

/superproject
    /submodule-a
    /submodule-b
    /submodule-c

For each submodule I am using Job DSL plugin and works fine except when some modules require others to compile or run tests -- that is one reason to aggregate all other repos in one super project.

What should I do for testing individual submodules as well as integration as part of a super project?


回答1:


I think this does not make sense. If git plugin is configured to trigger a job after post-receive hook in remote repository then it should work.

If a new commit is pushed to a submodule the parent project does not noticies. You must have to do:

git submodule update --remote --recursive
git commit
git push

Then, and only then, the job should receive the notification. For more information you could read:

  • Polling must die: triggering Jenkins builds from a git hook
  • How can I make Jenkins CI with git trigger on pushes to master?


来源:https://stackoverflow.com/questions/31214483/trigger-jenkins-tests-after-commits-in-git-submodules

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!