...
Note |
---|
If you override the surefire <argLine>...</argLine> then you need to add the SeaLights parameters inside the override value. See Surefire integration Do not call the JSON file 'sealights.json' as the agent uses this file name for override options For troubleshooting purpose, you can use "buildName":"SL_Timestamp" in your JSON file to have the Sealights Maven plugin generating automatically a time stamp (yyyy.MM.dd-hh.mm format) as a default build name.
|
...
Code Block |
---|
|
echo "Downloading Sealights Agents..."
wget -nv https://agents.sealights.co/sealights-java/sealights-java-latest.zip
unzip -o sealights-java-latest.zip
echo "Sealights agent version used is:" `cat sealights-java-version.txt`
echo '{
"executionType": "scanonly",
"tokenFile": "./sltoken.txt",
"createBuildSessionId": true,
"appName": "${JOB_NAME}",
"branchName": "${GIT_BRANCH}",
"buildName": "SL_Timestamp",
"packagesIncluded": "*com.example.*",
"packagesExcluded": "",
"filesIncluded": "*.class",
"filesExcluded": "*test-classes*",
"recursive": true,
"includeResources": true,
"proxy": null,
"logEnabled": false,
"logDestination": "console",
"logLevel": "warn",
"logFolder": "/tmp/sl-logs",
"sealightsJvmParams": {
"sl.scm.provider": "github"
},
"scannerJar": "./sl-build-scanner.jar",
"listenerJar": "./sl-test-listener.jar",
"filesStorage": "/tmp"
}' > slmavensl-mvn-build.json
echo "Updating POM with Sealights..."
java -jar sl-build-scanner.jar -pom -configfile slmavensl-mvn-build.json -workspacepath . |
The next step is to run your regular maven command, typically like 'mvn clean install' or 'mvn clean verify'.
...