1

I have a GIT setup in my AIX server for a java website.

I have setup Bare repositories where several developers commit their code and I have several Non-Bare repositories hosted in my development server.

I have heard that Jenkins can monitor the changes in GIT-HUB and then run the build process by checking out the latest contents from the GIT-HUB if a new commit is found.

Can I configure Jenkins to monitor my Bare and Non-Bare repositories in my dev server and start the build process when a new commit is found.

Here both GIT and Jenkins is setup on the same Unix Server.

Dark Matter
  • 2,231
  • 3
  • 17
  • 31

1 Answers1

0

As long as Jenkins has some means of accessing the git repository, it can monitor it and start a build when changes are detected. If Jenkins is on the same server, you should be able to give it the file system path to the repository.

Note that a single job can only monitor a single repository. That is, if you want to monitor multiple repositories, you either need several jobs or some kind of meta-repository that pulls them together. If this is what you need to do, you might want to consider this plugin, although it is only in an early alpha stage.

Lars Kotthoff
  • 107,425
  • 16
  • 204
  • 204
  • Thanks. Can you suggest any good video tutorials for Jenkins. – Dark Matter Mar 05 '13 at 11:16
  • A few things come up on youtube when you search for "Jenkins". I'm not aware of a full video tutorial. – Lars Kotthoff Mar 05 '13 at 11:38
  • I hope you can always resort to post-commit hook as described here: http://stackoverflow.com/questions/12794568/how-to-configure-git-post-commit-hook to initiate whatever you need. – dmitry_romanov Mar 05 '13 at 12:51
  • @dmitry_romanov:Thanks for the reply.Could you give an example of how I can refer a local bare repo located in say /usr/apps/gitrepo in Jenkins. – Dark Matter Mar 05 '13 at 16:24
  • @DarkMatter: I would create alias for `push` or `commit` command to trigger the build as described here: https://bitbucket.org/dromanov/testing_ground/wiki/Use%20web-hook%20to%20trigger%20CI%20build%20and%20test – dmitry_romanov Mar 22 '13 at 06:19