Skip to main content

CI/CD integration

Enterprise feature

CI/CD integration requires an Enterprise plan and a generated API key.

Run Revsnap regressions from your CI/CD pipeline and fail the build on pricing drift.

Video coming soonCI/CD integration with Revsnap
Trigger regression tests from GitHub Actions or GitLab CI.

Overview

A typical pipeline:

  1. Call Revsnap with your API key to start a run
  2. Poll or wait for results
  3. Exit with a non-zero code if the run fails

Your pipeline does not need to authenticate to Salesforce. Revsnap uses the OAuth connection you set up for that environment in the web app. The API key needs the Start runs and read results permission: a read-only key will be refused.

GitHub Actions example

Screenshot coming soonapi-keys-github-actionSample GitHub Actions workflow for Revsnap regression
Drop-in workflow snippet for GitHub Actions.
# .github/workflows/revsnap.yml
name: Revsnap regression

on:
pull_request:
branches: [main]

jobs:
regression:
runs-on: ubuntu-latest
steps:
- name: Run regression
env:
REVSNAP_API_KEY: ${{ secrets.REVSNAP_API_KEY }}
run: |
npx revsnap-cli run \
--snap pricing-core-baseline \
--target-org prod-sandbox

Running a tag from CI

Use the same tag name as in the web UI:

revsnap run --tag pricing-core-baseline

Exit codes

The CLI returns a non-zero exit code when a regression is detected. Configure your pipeline to fail the job on non-zero exit so PRs cannot merge with pricing drift.

When a run won't start

SymptomCauseFix
401 on every callKey revoked or expired, or the admin who generated it lost workspace accessHave an admin generate a new key
403 naming a permissionKey is read-onlyGenerate a key with Start runs and read results
403 mentioning environment scopeKey is pinned to a different environment than the snapshot or tagUse the matching key, or generate an unpinned one
429Too many runs started in a minute (60/key)Honor Retry-After; reduce fan-out
503Revsnap's rate limiter is temporarily unavailable, so submissions are pausedWait for Retry-After and retry the same command: nothing was started, so retrying cannot duplicate a run

Features

FeatureDescription
CI/CD nativeDrop-in for GitHub Actions, GitLab, Jenkins
No Salesforce secrets in CIRevsnap uses the org connection from the web app; your pipeline holds only the Revsnap API key
Scoped API keysBind keys to specific environments, and to read-only or read/write

API keys · CLI reference