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
Freestyle Project
- Open your Freestyle Project job
Relpace your Invoke top-level Maven targets build step with the Invoke top-level Maven targets with SeaLights Continuous Testing build step:
- In the Build section, click Add build step, and select Invoke top-level Maven targets with SeaLights Continuous Testing
- Enter the Maven goals used to build your project in the Goals field
- If your current Invoke top-level Maven targets step has anything in the advanced configuration then apply the same settings to the SeaLights step as well in the Advanced section
- Remove the previous build Invoke top-level Maven targets step that you used to run Maven
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