Skip to content

Jenkins โ€‹

Run your Shiplight E2E tests in a Jenkins pipeline and upload the results to Shiplight Cloud. Jenkins uses the same shiplight CLI as every other provider โ€” only the pipeline syntax differs.

Before you start โ€‹

  • A scaffolded Shiplight test project (/shiplight init). See the CI/CD overview for how the pieces fit together.
  • An org API token from app.shiplight.ai/api-tokens, stored as a Secret text credential (Manage Jenkins โ†’ Credentials). The template references it by ID shiplight-api-token.
  • A Pipeline job pointing at your repository โ€” Jenkins does not auto-discover a Jenkinsfile, so create the job once and set its SCM to your repo.

Pipeline โ€‹

Create a Jenkinsfile at your repository root:

groovy
pipeline {
  agent { docker { image 'node:22' } }
  environment {
    CI = 'true'
    SHIPLIGHT_API_TOKEN = credentials('shiplight-api-token') // Jenkins credential ID
  }
  stages {
    stage('Install') {
      steps {
        sh 'curl -fsSL https://bun.sh/install | bash'
        sh 'export PATH="$HOME/.bun/bin:$PATH"; bun install'
        sh 'export PATH="$HOME/.bun/bin:$PATH"; bun run playwright install --with-deps chromium'
      }
    }
    stage('E2E tests') {
      steps {
        sh 'export PATH="$HOME/.bun/bin:$PATH"; bun run shiplight test'
      }
    }
  }
}

Notes โ€‹

  • SHIPLIGHT_API_TOKEN enables completed test report uploads; set it as a Jenkins secret.
  • CI=true plus SHIPLIGHT_API_TOKEN enables the shared Shiplight Cloud action cache. AI-powered actions can self-heal through the Shiplight LLM proxy, and healed locators from passing tests are reused by later runs.
  • Install Chromium yourself (bun run playwright install --with-deps chromium); no stock image ships it.
  • Failure triage on Jenkins: classification runs on the server for uploaded runs from any provider, but the optional autofix workflow (auto-triage) is GitHub Actions only.
  • Project in a subdirectory (e.g. tests/e2e)? Wrap the steps in dir('tests/e2e') { โ€ฆ }.

Released under the MIT License.