/
Using Python Agent - Generating a session ID
Using Python Agent - Generating a session ID
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
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
sl-python config --appname myApp --branchname master --buildname 1 --exclude "*venv*","*tests*" [--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
Unix:
export SL_BUILD_SESSION_ID=`cat buildSessionId.txt`
Windows:
set /p SL_BUILD_SESSION_ID=<buildSessionId.txt
Related content
Running Tests with unittest, unittest2, pytest, nose or behave
Running Tests with unittest, unittest2, pytest, nose or behave
More like this
Downloading the Python agent file
Downloading the Python agent file
Read with this
Using Go Agent - Initializing agent and Generating a session ID
Using Go Agent - Initializing agent and Generating a session ID
More like this
Using Python Agent - Scanning a build
Using Python Agent - Scanning a build
Read with this
ANT build tool
ANT build tool
More like this
Using Python agent - Command Reference
Using Python agent - Command Reference
Read with this