Reputation: 377
I was thinking I'll try out Jenkins since it looks a rather nice continous integration environment for our gitolite projects. However I don't know a few things.
Setup:
Goal: I wish Jenkins would check a repository when someone pushes into it, if the latest push does something bad to the whole project (laravel website basically). After that, check if the push was made for developement branch, then pull it to the corresponding staging server. However, if it was pushed into the master, then pull it to the production server.
Question #1: Is it possible to trigger a git pull command with Jenkins to another server? If yes, then how?
Question #2: How can I check the commit with Jenkins if it is broken?
Question #3: Which server should I install Jenkins to? I was thinking of using a docker. Locally it is running like a charm.
Question #4: Is it possible to import all the repositories to individual projects from the git server automatically or I have to do that manually one-by-one?
Upvotes: 0
Views: 2692
Reputation: 29
have a look at https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin
In each Jenkins-Project you can configure via this Jenkins-Plugin a git-repository to become cloned by jenkins.
Question #1: Is it possible to trigger a git pull command with Jenkins to another server? If yes, then how?
If you start a build-process, than Jenkins pulls the repository first.
Question #2: How can I check the commit with Jenkins if it is broken?
I don't understand what you mean.
Question #3: Which server should I install Jenkins to? I was thinking of using a docker. Locally it is running like a charm.
Well, I use a Jenkins on an ubuntu lts (without docker)
Question #4: Is it possible to import all the repositories to individual projects from the git server automatically or I have to do that manually one-by-one?
This does not make sence to me. If you want in the workspace of one i.e. freestyle Jenkins Project multiple git-repositorys, than at the project level the Git Plugin has to be configured by selecting the Git option at the Source Code Management section multible times.
Upvotes: 1