Before running the build scan and tests, you need to create a session ID. The session ID is provided to each step in order link them together as one complete cycle.
Installation
First install and set up the Jenkins plugin, See 'SeaLights Jenkins plugin - Installation and setup' for details
Generating a session ID
Freestyle Project
- Open your Freestyle Project job
- In the Build section, click Add build step, and select SeaLights CLI
Maven Project
- In the Pre Steps section, click Add pre-build step and select SeaLights CLI
Configuring SeaLights CLI to generate the session ID
- In the Action select Config - Create build session data
- In the Monitored Application Packages enter the list of packages that you want SeaLights to analyze. It should be a comma separated list with asterisks before and after each entry
- Press the SeaLights... button to expose the SeaLights parameters
Enter the App Name as you want it to be displayed in the SeaLights dashboard
Put ${JOB_NAME} for Jenkins job name
Enter the Branch Name you are working on and want to display in the SeaLights dashboard
Put ${GIT_BRANCH} if using git
Select the Build Name that you want to have for each build and which will be displayed on the SeaLights dashboard
Using the session ID
The SeaLights CLI config step generates the session ID and places it a buildSessionId.txt in the jobs workspace.
It also creates two parameters which can be used in following build steps:
- SL_BUILD_SESSION_ID - contains the session ID itself
- SL_BUILD_SESSION_ID_FILE - contains the full path to the buildSessionId.txt in the jobs workspace