Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
maxLevel2
printablefalse

...

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.

Info

See 'Java Command Reference - Installing test listener as Java Agent' for more parameter values and information

...

Code Block
languagebash
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": "full", 
    "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, 
    "testStage": "Unit Tests", 
    "labId": null, 
    "executionTypeproxy": "full"null, 
    "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 .

...