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 '{
"tokenFile": "./sltoken.txt",
"createBuildSessionId": true,
"appName": "${JOB_NAME}",
"branchName": "${GIT_BRANCH}",
"buildName": "${BUILD_NUMBER}",
"packagesIncluded": "*com.example.*",
"packagesExcluded": "",
"filesIncluded": "*.class",
"filesExcluded": "*test-classes*",
"recursive": true,
"includeResources": true,
"testStage": "Unit Tests",
"labId": null,
"executionType": "full",
"logEnabled": false,
"logDestination": "console",
"logLevel": "warn",
"logFolder": "/tmp",
"sealightsJvmParams": {},
"enabled": true,
"filesStorage": "/tmp"
}' > slmaven.json
echo "Updating POM with Sealights..."
java -jar sl-build-scanner.jar -pom -configfile slmaven.json -workspacepath . |