Component 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
./node_modules/.bin/slnodejs config --tokenfile /path/to/sltoken.txt --appname "IntegrationBuildName" --branch "master" --build "1"
mv buildSessionId integrationBSID.txt
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.
[
{
"appName": "sl-sample-backend",
"branch": "master",
"build": "1.0.1_233"
},
{
"appName": "sl-sample-frontend",
"branch": "master",
"build": "1.2.2_44"
}
]
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.
[
{
"component_name": "sample-frontend",
"buildSessionId": "123456789"
},
{
"component_name": "sample-backend",
"buildSessionId": "abcdefghi"
}
]
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
java -jar sl-build-scanner.jar -scan -tokenfile sltoken.txt -buildsessionidfile integrationBSID.txt -componentfile sl-integration-components.json
Nodejs Agent
./node_modules/.bin/slnodejs scan --tokenfile sltoken.txt --buildsessionidfile integrationBSID.txt --dependenciesFile sl-integration-components.json
Once this has run, all components listed in the dependencies file will be added to the newly created integration build.
Last updated
Was this helpful?