d9dfc97d82170aa2fb2c07a643b8ea2e755895d7
wiki/ci.md
| ... | ... | @@ -0,0 +1,31 @@ |
| 1 | +# Continuous Integration with Hudson/Jenkins |
|
| 2 | + |
|
| 3 | +Our default Hudson runs on http://hudson.sapsailing.com. If you need access, please contact axel.uhl@sap.com or simon.marcel.pamies@sap.com. We have a build job running for the master branch which will automatically pick up any changes, run a build with tests and inform committers about flaws they introduced that broke the build. |
|
| 4 | + |
|
| 5 | +It is good practice to set up a new Hudson job for major branches that require solid testing before being merged into the master branch. The entry page at http://hudson.sapsailing.com explains how to do this. It basically comes down to copying a template job and adjusting the branch name. As easy as that :-) |
|
| 6 | + |
|
| 7 | +## In case you'd like to set up your own Hudson/Jenkins |
|
| 8 | + |
|
| 9 | +Initially we had trouble with Jenkins and the GIT plug-in. However, https://issues.jenkins-ci.org/browse/JENKINS-13381?focusedCommentId=196689&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-196689 explains that installing the Credentials plugin into Jenkins may help. Basically, what is needed over and above a plain Jenkins installation are the following plug-ins: |
|
| 10 | + |
|
| 11 | +* Credentials |
|
| 12 | +* Jenkins GIT |
|
| 13 | +* Jenkins GIT Client |
|
| 14 | +* Measurement Plots |
|
| 15 | +* SSH Credentials |
|
| 16 | +* Xvnc |
|
| 17 | + |
|
| 18 | +Note, though that the Xvnc plug-in in version 1.16 seems to be causing some trouble (https://issues.jenkins-ci.org/browse/JENKINS-22105). Downgrading to 1.14 helps. The 1.14 .hpi file can be obtained, e.g., here: http://www.filewatcher.com/m/xvnc.hpi.21882-0.html. |
|
| 19 | + |
|
| 20 | +The basic idea of setting up a build job is to create a so-called "free-style software project" which then executes our `configuration/buildAndUpdateProduct.sh` script using the `build` parameter. Top-down, the following adjustments to a default free-style job that are required for a successful build are these: |
|
| 21 | + |
|
| 22 | +* select "Git" |
|
| 23 | +* enter `ssh://trac@sapsailing.com/home/trac/git` as the Repository URL |
|
| 24 | +* create credentials using the `Add` button, e.g., pasting your private key and providing Jenkins with the password |
|
| 25 | +* enter `master` for "Branches to build" |
|
| 26 | +* under "Build Triggers" check "Poll SCM" and enter `H/1 * * * *` for the schedule which will check for updates in git every minute |
|
| 27 | +* under "Build Environment" check "Run Xvnc during build" |
|
| 28 | +* under "Build" select "Add build step" --> "Execute Shell" and paste as command something like this: `ANDROID_HOME=/usr/local/android-sdk-linux configuration/buildAndUpdateProduct.sh build`. Adjust the location of the Android SDK accordingly and install it if not already present. |
|
| 29 | +* as Post-build Action, select "Publish JUnit test result report" and as Test report XMLs provide `**/TEST-*.xml` as the file pattern for the test reports. |
|
| 30 | +* check the "Additional test reports features / Measurement Plots" box |
|
| 31 | +* provide e-mail notification settings as you see fit |
|
| ... | ... | \ No newline at end of file |