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 to link them together as one complete cycle
Generating a session ID in Node.js
Generating a session ID in Node.js is done using the SeaLights Node.js Agent with the config flag
npx slnodejs config --tokenfile ./sltoken.txt --appname "myApp" --branch "master" --build "1"The most common cause of the "Module already exists" error message indicates that the config command was likely called without changing the buildname.
Using the session ID
The session ID will be printed to the console output and a file called 'buildSessionId' will be generated containing it. The file can be used as is in the agent parameters or to fill in an environment parameter in a command line.
export SL_BUILD_SESSION_ID=$(cat buildSessionId)set /p SL_BUILD_SESSION_ID=<buildSessionIdLast updated
Was this helpful?

