Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...


Sealights Parameter
Travis CI Env. Variable
Comment
latestCommitTRAVIS_PULL_REQUEST_SHA
pullRequestNumberTRAVIS_PULL_REQUEST
repoUrlĀ TRAVIS_REPO_SLUGYou may need to prepend the base URL of your Github repository, like "https://github.com/$TRAVIS_REPO_SLUG"
targetBranchTRAVIS_BRANCHThis 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
languagepy
titleSample YML configuration
linenumberstrue
language: java

install:
  - wget -nv 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.*"

script:                   # Sealights is predefined in the POM Profile under the profile 'sealights'
  - mvn clean test -Psealights

...