CI/CD Integration Examples

This section provides example configurations for running the SeaLights SBT plugin in common CI/CD systems.

All examples use the SeaLights Build Scanner CLI:

java -jar sl-build-scanner.jar -sbt -configfile ./sl-config.json -workspacepath .
  • Jenkins:

stage('SeaLights Build') {
    steps {
        sh 'java -jar tools/sl-build-scanner.jar -sbt -configfile sl-config.json -workspacepath $WORKSPACE'
        sh 'sbt sealightsRun'
    }
}
  • GitHub Actions:

steps:
  - uses: actions/checkout@v3
  - run: java -jar tools/sl-build-scanner.jar -sbt -configfile sl-config.json -workspacepath $GITHUB_WORKSPACE
  - run: sbt sealightsRun
  • GitLab CI:

sealights_build:
  script:
    - java -jar tools/sl-build-scanner.jar -sbt -configfile sl-config.json -workspacepath $CI_PROJECT_DIR
    - sbt sealightsRun

Split Execution Example (Advanced)

In some pipelines, you may want to split scanning and testing into separate steps.

Step 1 — Scan Only

Step 2 — Tests Only

circle-info

Tip: Ensure the Build Session ID from the scan step is preserved between stages.

Last updated

Was this helpful?