Table of Contents |
---|
...
Sealights Parameter | Travis CI Env. Variable | Comment |
---|---|---|
latestCommit | TRAVIS_PULL_REQUEST_SHA | |
pullRequestNumber | TRAVIS_PULL_REQUEST | |
repoUrlĀ | TRAVIS_REPO_SLUG | You may need to prepend the base URL of your Github repository, like "https://github.com/$TRAVIS_REPO_SLUG" |
targetBranch | TRAVIS_BRANCH | This is the branch name itself and might need to have a prefix added (Like: "origin/") to match the branch that was provided to SeaLights when scanning the merged branch |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
language: java
install:
- wget https://agents.sealights.co/sealights-java/sealights-java-latest.zip
- unzip sealights-java-latest.zip
before_script:
- export SL_PR_REPO="https://www.github.com/$TRAVIS_REPO_SLUG"
- java -jar sl-build-scanner.jar -prConfig -appname "MyApp-Master" -latestCommit $TRAVIS_PULL_REQUEST_SHA -pullRequestNumber $TRAVIS_PULL_REQUEST -repoUrl $SL_PR_REPO -targetBranch origin/$TRAVIS_BRANCH -tokenfile sl_acc_token.txt -pi "*co.sealights.sample.*" -enableNoneZeroErrorCode
script: # Sealights is predefined in the POM Profile under the profile 'sealights'
- mvn clean test -Psealights |
...