For the complete documentation index, see llms.txt. This page is also available as Markdown.

Generating a session ID

Before running the build scan and tests, create a session ID. Pass the same ID to each step so SeaLights links them as one complete cycle.

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

Generating a session ID in Node.js

Use config to open the build session and write buildSessionId.

BUILD_NAME="$(date -u +"%Y%m%d_%H%M%S")"

npx slnodejs config \
  --tokenFile ./sltoken.txt \
  --appName "myApp" \
  --branchName "main" \
  --buildName "$BUILD_NAME"

Each successful call creates the data structures for this build.

The appName / branchName / buildName trio must be unique on every run.

Locally, use a timestamp for buildName.

In CI, use the platform run ID or build ID.

See NodeJS Agent — Command Reference for the full parameter details.

Using the session ID

The command prints the session ID and writes it to buildSessionId. Reuse that file in later agent commands, or export it as an environment variable.

Last updated

Was this helpful?