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 7 Current »

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

Agent File

Our Python agent is published in Python PyPi repository: https://pypi.org/project/sealights-python-agent/
You can download it and all its dependencies using the following command:

pip install sealights-python-agent

When installing a specific version, you have to mention it explicitly

pip install sealights-python-agent==2.2.5

The agent uses the cryptography package which requires OpenSSL libraries and include files.
On Linux this is usually available but on Windows systems, you might need to install it and add it to the LIB & INCLUDE folders

Generating a session ID in Python

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

Sample command
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
Unix:
export SL_BUILD_SESSION_ID=`cat buildSessionId.txt`

Windows:
set /p SL_BUILD_SESSION_ID=<buildSessionId.txt
  • No labels