Overview
Jenkins, an open source CI tool is used to run build for Connect project for different profiles and deploy code to different application servers.
Configuration
- Nightly build is configured to get fresh source code from Git Repository, compile, build and deploy to application servers. We are using JBoss and embedded wildfly application servers to do deployments. Build is configured to run every day at midnight.
- We use Maven, as build tool to build the code, run different goals and specific plugins.
- By default build will run profiles which are configured to run when no profiles are passed but we can particular profiles - like PD, AD, X12, DR as command line argument to maven command.
- Maven builds are highly configurable and we can pass different pom file and configure the path, JVM options and settings file to build the profile.
- We currently keep 10 last builds for history purpose.
- We also publish analysis results for findbugs and dependency-check source code quality checks.
- We are using shell commands for:
- For using Git to get fresh repo code ( git checkout CONNECT, git pull, git clean -dfx ).
- For cleaning up earlier deployed directories ( rm -rf $WORKSPACE/.repository/*, cp ../settings.xml ).
- For connecting to JBoss application server machine and deploying source code for that application server.
- For calling other scripts in order to clean up, start, undeploy and stop servers.
- An experimental plugin called "Warnings Next Generation" to aggregate Findbugs, Sonar, Java, and Checkstyle issues into a single viewable report on the nightly jenkins job.
Issues and Resolutions
Issue | Resolution | Ticket |
---|---|---|
JBoss ear not deploying | Problem was that, it was pointing to wrong java version, It was using 1.6 java version instead of 1.7 version and JAVA_HOME was not set to correct java version. In order to fix this problem, we changed .bashrc file under /home/jenkins directory to point to correct java version | FHAC-481 |
Dependency check failing | It was missing advance settings information which was mentioned for findbugs plugin to run and there is new profile which is added called SCA and by adding that profile, it runs dependency check and source code analysis plugins | No ticket, this was a secondary issue that was discovered and resolved as part of FHAC-481 |