Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Open your Freestyle Project job
  • In the Build section, click Add build step, and select In the Pre Steps section, click Add pre-build step and select SeaLights CLISeaLights CLI

Maven Project


  • Image Added

Configuring SeaLights CLI to generate the session ID

  • In the Action select Config - Create build session data
  • Press the If you are building a Java project, then open the Add drop down and select Java Options...
    • 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

    Note

    This is only needed if building a Java project. If the session ID is being created for other languages the you can just put any random package like edu.lmu.*

    Press the SeaLights CLI Advanced... button to expose the SeaLights parameters
  • Enter the App Name as you want it to be displayed in the SeaLights dashboard

    InfoPut $

    . The default is ${JOB_NAME} for the Jenkins job name

  • Enter the Branch Name you are working on and want to display in the SeaLights dashboard

    InfoPut $

    . The default is ${GIT_BRANCH}

    if using git

    for the branch used with a git SCM

  • Select the Build Name that you want  to have for each build and which will be displayed on the SeaLights dashboard

    Note
    iconfalse
    For descriptions of each of the available options, see Jenkins Plugin Parameters
    Image Removed


    Image Added

Using the session ID

The SeaLights CLI config step generates the session ID and places it a buildSessionId.txt  in the jobs workspace.

...

  • 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

Using tokens

This step will also expose a new parameter called SL_TOKEN . It will contain  containing the token entered in the global configuration of the plugin in Manage Jenkins > Configure System section.

This is to allow you have the token when running our agents using the default command line steps.

Warning

If you do not create the Build Session ID via the Sealights Jenkins Plugin, the SL_TOKEN parameter will not be available for next steps of your job.