简体   繁体   中英

How to detect changes in "repo" for continuous integration in Jenkins?

repo is a tool from Google that pulls in multiple git repos into one directory.

If I have ten git repos using repo , how do I detect changes so that I can kick off CI builds from Jenkins?

For instance, a given manifest (ie default.xml ) may contain

  • five git repos that point to origin/master
  • three git repos that point to origin/feature1
  • two git repos that point to a tag

If these ten repos were in a big monolithic git repo, I would simply create a server side hook to detech changes and start an appropriate Jenkins job.

In a case where the separate ten repos are collected in via repo , how do I detect the changes in the appropriate branches and tags?

Use the repo Jenkins plugin, found at https://wiki.jenkins-ci.org/display/JENKINS/Repo+Plugin .

Then use "Gerrit Repo" in the job's "Source Code Management" section, and specify the URL to your repo manifest repository as "Manifest Repository Url".

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