Task #1164
closed
Setup Jenkins to perform basic integrated tests and connect it to Gerrit Code Review
Added by Alex Afanasyev almost 11 years ago.
Updated almost 11 years ago.
Description
Setup a continuous integration system: After code review is submitted to Gerrit, Jenkins should receive notification, dispatch the job to linux, OS X, and FreeBSD server (initial step, just linux). After job is complete, depending on completion status, Jenkins should review the code +1 if compiled and tests ok, -1 if compilation or tests failed.
Jenkins has tons of plugins, please check them out and suggest which ones are useful and should be used by us. Junxiao / Alex can help supplying machines to run Jenkins and Jenkin slaves (for compilation jobs).
- Subject changed from Set up Jenkins to perform basic integrated tests and connect it to Gerrit Code Review to Setup Jenkins to perform basic integrated tests and connect it to Gerrit Code Review
- Description updated (diff)
- Parent task deleted (
#1117)
- % Done changed from 0 to 60
To Install Jenkins:
- Download jenkins.war from here: http://mirrors.jenkins-ci.org/war/latest/jenkins.war
Run the command:
java -jar jenkins.war
To install plugin:
- Open a browser and go to jenkins web-ui (In my case, localhost:8080)
- Click on "Manage Jenkins" on the left
- Click on "Manage Plugins"
- Switch to "Available" tab, and search for the plugin you want to install (e.g. Gerrit Trigger)
- Check on the checkbox to the left of the plugin link and install
List of plugins I am using:
- Gerrit Trigger
- Jenkins GIT client plugin
- Rebuilder
- SSH Agent Plugin
And this is the tutorial page of Gerrit trigger: https://wiki.jenkins-ci.org/display/JENKINS/Gerrit+Trigger
- % Done changed from 60 to 90
I am now able to build NDN-CPP on my Macbook using Jenkins with the plugins I mentioned. The only thing that I am not sure is that whether the trigger works. To test Gerrit trigger, I think I need a Gerrit test ground. Alex has set up one for me (http://gerrit.irl.cs.ucla.edu/#/q/status:open,n,z) but there is no project available for test.
Jenkins uses local env to build the projects. Therefore, for each of the project, we only need to install dependencies once (we can try to update dependencies every time we build and test though). Since Jenkins uses local env to build, I suggest to use Travis-CI for OSX, and Jenkins for Ubuntu. This is because setting up a Ubuntu VM for Jenkins is much easier than setting up a OSX VM.
- Status changed from New to Resolved
On Gerrit I'm seeing "verified" comments from Jenkins, so I assume this task is resolved.
- Status changed from Resolved to In Progress
- Status changed from In Progress to Resolved
- % Done changed from 90 to 100
Since the master and ubuntu slave is up and running. I think this task is resolved.
- Status changed from Resolved to Closed
Also available in: Atom
PDF