Our CI Environment – Part 3
Jenkins is used to build, configure, test, validate, deploy and promote most of our solutions and frameworks in InfoAxon development environment.
Many plugins has been used (thanks to Jenkins community to provide such huge library of plugins). Some important plugins used are -
- Build Promotion plugin (http://wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin) – for deploying and promoting builds to QA, UAT, LIVE server automatically.
- JIRA plugin (http://wiki.jenkins-ci.org/display/JENKINS/JIRA+Plugin) – for automatically updating JIRA tickets whenever a build has been made.
- NAnt plugin (http://wiki.hudson-ci.org/display/HUDSON/NAnt+Plugin) – in order to compile and use Microsoft .NET applications as well.
- Visual Sourcesafe plugin (http://wiki.hudson-ci.org/display/HUDSON/Visual+SourceSafe+Plugin) – to retrieve code base from VSS database.
- SSH Publisher plugin (http://wiki.jenkins-ci.org/display/JENKINS/Publish+Over+SSH+Plugin) – to publish and deploy build artifacts on another server over SSH. Heavily used for Promotion purpose.
- Violations Plugin (https://wiki.jenkins-ci.org/display/JENKINS/Violations) – to report and display all code level rule violations.
The Project Dashboard shows (snapshot below) all information related to the particular job.
The Build Dashboard shows (snapshot below) information relevant for that particular build. You can see all the JIRA tickets are automatically linked here.
Build Promotion screen helps you to promote/deploy any build to any server such as Development server, QA server, UAT server or LIVE server.
Automatic checking of Best Practices Adherence, Coding mistakes, Potential Bugs etc are done by PMD, Checkstyle, Findbugs etc. All these tools are integrated in the project Ant build script (code segment below) – thus each time build is executed, these checkings are performed automatically, and alerts us in case of any issues.
<target name="sonar">
<property name="sonar.sources" value="............." />
<property name="sonar.projectName" value=".........." />
<sonar:sonar key=".........." version="............" xmlns:sonar="antlib:org.sonar.ant" />
</target>
<target name="checkstyle">
<cs:checkstyle config="checkstyle.xml" failureProperty="checkstyle.failure" failOnViolation="false" xmlns:cs="antlib:com.puppycrawl.tools.checkstyle">
<formatter type="xml" tofile="checkstyle_report.xml"/>
<fileset dir="..........." includes="**/*.java"/>
</cs:checkstyle>
</target>
<target name="findbugs">
<findbugs home="${findbugs.home}" output="xml" outputFile="report.xml" jvmargs="${jvmargs}">
<sourcePath path="..........." />
<class location="............." />
</findbugs>
</target>
The Violation screen displays the list of code rules violations in the current build.
We use Sonar to analyze the quality of the full source code.
Thus the full Continuous Integration eco-system in InfoAxon development environment provides us full flexibility and automatic execution on the compiling, debugging, testing, code validations, deployment, promotion tasks.










