SeaLights Jenkins plugin for Maven Project job - Scanning Builds and running Unit Tests using Maven

Plugin Configuration

In order to Scan builds and run Unit Tests using Maven using the SeaLights Jenkins plugin, Jenkins must be used together with the Maven build tool.

Prerequisites

The SeaLights Jenkins Plugin and the SeaLights Test Listener must have read/write permissions to the temp folder of the machine, unless you are using a different file storage folder, which can be configured on the SeaLights global configuration screen.

Since the SeaLights Jenkins plugin modifies the pom.xml file, then if the SeaLights Maven plugin is already in your pom.xml file, the SeaLights Jenkin plugin will not have an effect.

Installation

First install and set up the Jenkins plugin, See 'SeaLights Jenkins plugin - Installation and setup' for details

Configuring your Job

Maven Project

  • In the Pre Steps section, click Add pre-build step and select Invoke top-level Maven targets with SeaLights Continuous Testing
  • In the Action field, select Integrate SeaLights into POM files. Requires adding a 'SeaLights Continuous Testing - Cleanup' build step option
  • In the Post-Steps section, click Add post-build step and select SeaLights Continuous Testing - Cleanup
  • Mark the Restore Build File check box

    For descriptions of each of the available options, see Jenkins Plugin Parameters

Configuring SeaLights options

Regardless of the type of project you have, once you have configured the above, you now need to configure the SeaLights options

  • Press the SeaLights... button to expose the SeaLights parameters

Session ID

  • Validate that ${SL_BUILD_SESSION_ID} is in the Build Session Id field


There are various other setting that can be changed and set according to your needs. For descriptions of each of the available options, see Jenkins Plugin Parameters