Versions Compared

Key

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

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.

Download a token from the SeaLights dashboard and place the sltoken.txt file in the working directory

Info

See 'Generating an Agent token' for instructions on how to generate a token

...

Generating a session ID in Python

Generating a session ID in Python is done using the SeaLights Python Agent with the config flag

Code Block
languagebash
sl-python config --appname myApp --branchname master --buildname 1 --exclude "*venv*" [--workspacepath /path/to/app]

Using the session ID

The session ID will be printed to the console output and a file called 'buildSessionId.txt' will be generated containing it.

The file can be used as is in the agent parameters or can be used to fill in an environment parameter to be in a command line.

Copying token to environment variable

...

languagetext

...

must initialize the agent with the token to use and create a session ID.

Initializing the SeaLights CLI

Code Block
./slcli config init --lang go --token ./sltoken.txt

Generating a session ID

The Build Session uniquely identifies your application's build and associates any coverage (i.e., all test stages and tests) with that specific build. The session ID is provided for each step and command to link them together as one complete cycle.

Code Block
languagebash
./slcli config create-bsid --app <your-app-name> --branch <your-branch-name> --build <your-build-number>