Reporting an Integration Build using a Components file

The following steps describe the requirements to report an integration build using the Java or NodeJS build scanner.

As a pre-requisite, each component needs to be built, scanned, and reported to SeaLights before reporting the integration build itself.

Create an Integration Build Session ID

Each integration build gets reported as a new build to Sealights, and therefore needs a new session ID of its own.

Java Agent

java -jar sl-build-scanner.jar -config -tokenfile /path/to/sltoken.txt -appname "IntegrationBuildName" -branchname "master" -buildname "1" -pi "*integration.build*" -buildsessionidfile integrationBSID.txt

Nodejs Agent

Unix

./node_modules/.bin/slnodejs config --tokenfile /path/to/sltoken.txt --appname "IntegrationBuildName" --branch "master" --build "1" mv buildSessionId integrationBSID.txt

Windows

call .\node_modules\.bin\slnodejs config --tokenfile \path\to\sltoken.txt --appname "IntegrationBuildName" --branch "master" --build "1" ren buildSessionId integrationBSID.txt

Please notice that for clarity, we have changed the default file name of the Build Session ID to integrationBSID.txt (instead of default buildSessionId.txt in Java or buildSessionId in slnodejs)

Create a Components JSON File

Create a dependencies file using one of the formats available below. You can name this file sl-integration-components.json for example.

Using the app/branch/build format for every component

Using the buildSessionId format for every component

Using the app/branch/build format for every component

Using the buildSessionId format for every component

 

The components listed in the dependencies file must be referring to builds already reported to Sealights (including the Build Scan step) using exact same appName/branchName/buildName parameters reported.

Adding comments to the JSON file with components' BSID only

The JSON file format does not currently support comments.
In order to assist CI job troubleshooting, when reporting a large number of components using the BSID only method, an arbitrary field can be added which serves as a component name comment e.g.

Report the Integration Build to the Dashboard via the Build Scanner

Run the build scanner referencing the dependencies file created in the previous step and that we have named sl-integration-components.json

Java Agent

Nodejs Agent

Unix

Windows

Once this has run, all components listed in the dependencies file will be added to the newly created integration build.