Jenkins Nightly CI

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

  1. 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. 
  2. We use Maven, as build tool to build the code, run different goals and specific plugins. 
  3. By default, a maven build will run profiles which are configured to run when no profiles are explicitly enabled/disabled. Explicit profiles can be enabled as command line argument using the -P flag.
  4. 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.  
  5. We currently keep the last 10 builds for history purposes, including all the build artifacts from the build itself.
  6. We also push analysis results for SonarQube and dependency-check source code quality checks. 
  7. We are using shell commands for:
    1. For using Git to get fresh repo code ( git checkout CONNECT, git pull, git clean -dfx ).
    2. For cleaning up earlier deployed directories ( rm -rf $WORKSPACE/.repository/*, cp ../settings.xml ).
    3. For connecting to JBoss application server machine and deploying source code for that application server.
    4. For calling other scripts in order to clean up, start, undeploy and stop servers.
  8. 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.