Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

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:
    1. In the Build section, click Add build step, and select Invoke top-level Maven targets with SeaLights Continuous Testing
    2. Enter the Maven goals used to build your project in the Goals field
    3. 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
    4. Remove the previous build Invoke top-level Maven targets step that you used to run Maven
    For descriptions of each of the available options, see Jenkins Plugin Parameters

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

  • No labels