Allscreenshots
Sign inGet an API key

Screenshot capture in Jenkins pipelines

Add visual testing to your Jenkins builds without managing browsers

Integrate Allscreenshots into your Jenkins CI/CD pipelines to capture screenshots during builds. Skip the complexity of managing Selenium or Playwright on Jenkins agents — one API call captures any page and stores the result as a build artifact.

Connect in 4 steps

  1. 1

    Add credentials

    Store your Allscreenshots API key in Jenkins credentials manager.

  2. 2

    Add a pipeline stage

    Add a screenshot stage to your Jenkinsfile.

  3. 3

    Call the API

    Use curl or the HTTP Request plugin to capture screenshots.

  4. 4

    Archive artifacts

    Store screenshots as Jenkins build artifacts.

Jenkinsfile

groovy
1pipeline { 2 agent any 3 4 environment { 5 API_KEY = credentials('allscreenshots-api-key') 6 } 7 8 stages { 9 stage('Capture Screenshots') { 10 steps { 11 sh """ 12 curl -X POST 'https://api.allscreenshots.com/v1/screenshots' \ 13 -H 'X-API-Key: ${API_KEY}' \ 14 -H 'Content-Type: application/json' \ 15 -d '{ 16 "url": "https://staging.yourapp.com", 17 "fullPage": true, 18 "viewport": { "width": 1920, "height": 1080 } 19 }' -o screenshot.png 20 """ 21 } 22 } 23 } 24 25 post { 26 always { 27 archiveArtifacts artifacts: 'screenshot.png', 28 allowEmptyArchive: true 29 } 30 } 31}

Built for Jenkins

No agent dependencies

No need to install Chrome or Puppeteer on Jenkins agents. The API handles all browser rendering.

Works with any agent

The API call works from any Jenkins agent — Linux, Mac, Windows, or Docker.

Build artifacts

Screenshots are archived as standard Jenkins build artifacts for easy access and history.

Questions

Does this work with Jenkins declarative pipelines?

Yes. The example above uses declarative pipeline syntax. It also works with scripted pipelines.

Can I use this with Jenkins Blue Ocean?

Yes. The pipeline runs identically in both Classic and Blue Ocean interfaces. Screenshots appear in the artifacts tab.

How do I store the API key in Jenkins?

Go to Manage Jenkins > Credentials and add a new Secret Text credential with your API key.

Keep exploring

Start with one request

Free plan: 100 screenshots. No credit card.

Get an API key
  • Full-page captures
  • Popups and repeated sticky bars removed
  • Markdown, JSON and PDF output
  • Crawl a site from one URL
  • Desktop, tablet and phone in one image
  • Works in n8n, Make and Zapier
  • MCP server for AI assistants