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
Overview
A typical pipeline:
- Call Revsnap with your API key to start a run
- Poll or wait for results
- 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
# .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
| Symptom | Cause | Fix |
|---|---|---|
401 on every call | Key revoked or expired, or the admin who generated it lost workspace access | Have an admin generate a new key |
403 naming a permission | Key is read-only | Generate a key with Start runs and read results |
403 mentioning environment scope | Key is pinned to a different environment than the snapshot or tag | Use the matching key, or generate an unpinned one |
429 | Too many runs started in a minute (60/key) | Honor Retry-After; reduce fan-out |
503 | Revsnap's rate limiter is temporarily unavailable, so submissions are paused | Wait for Retry-After and retry the same command: nothing was started, so retrying cannot duplicate a run |
Features
| Feature | Description |
|---|---|
| CI/CD native | Drop-in for GitHub Actions, GitLab, Jenkins |
| No Salesforce secrets in CI | Revsnap uses the org connection from the web app; your pipeline holds only the Revsnap API key |
| Scoped API keys | Bind keys to specific environments, and to read-only or read/write |