Previews help you catch issues early by providing isolated testing environments for every pull request.
How Previews Work
Previews are automatically triggered by GitHub webhooks when pull requests are opened, updated, or closed. Ryvn will create a unique blueprint installation for the preview and allow you to stand up a single or multiple services, depending on what your blueprint contains. Each preview is destroyed after the pull request is closed or merged or if there is no new activity for the configured stale duration (default: 7 days).Previews may continue to incur additional infrastructure costs if you have a large number of PRs being opened and not
being closed.
Enabling Previews
Configure Preview
Define previews in your resource YAML files with a blueprint and target environment. Make sure the target environment
supports cluster auto-scaling.
Automatic Deployment
Ryvn detects the PR and automatically deploys your changes using the preview configuration.
Using Previews
Previews are configured in your resource YAML files alongside your blueprints and environments. Here’s an example of a preview configuration:Preview Configuration
Each preview requires three main components:Preview Properties
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name of the preview. Must be lowercase alphanumeric with hyphens, max 63 characters. |
environment | string | Yes | Name of the environment where previews will be installed. |
blueprint | string | Yes | Name of the blueprint to install. |
staleDuration | string | No | Duration before inactive previews are cleaned up (e.g., “72h”). Default: “168h” (7 days). Minimum: “15m”. |
Environment Selection
Theenvironment field specifies where your preview will be deployed. This should typically be a dedicated environment
for previews that is using an auto-scaling cluster.
Blueprint Configuration
Theblueprint configuration is similar to environment installations but with preview-specific inputs:
Automating URL Generation
Each preview can get a unique URL assigned if your installation uses the correct ingress configuration that generates unique URLs. See the example below:Stale Preview Management
By default, previews are automatically cleaned up after 7 days of inactivity (no new releases). You can customize this behavior:Custom Stale Duration
Set thestaleDuration property to control how long a preview remains active without new releases:
"30m" (30 minutes), "24h" (24 hours), "168h" (7 days). Minimum value is "15m".
Preventing Automatic Cleanup
Add thepreview:keep-alive label to a pull request to exempt its preview from stale cleanup. The preview will remain active until the PR is closed or merged, regardless of inactivity.
This is useful for:
- Long-running feature branches
- PRs under extended review
- Demonstration environments
Troubleshooting
Common Issues
Preview Not Created
Preview Not Created
Problem: Pull request opened but no preview was created.
Solutions: Verify that the service defined in the blueprint is using the Ryvn GitHub action. If your repository name was recently changed, this may also cause issues. Note: Previews are not supported for public helm-charts.
Preview Deployment Fails
Preview Deployment Fails
Problem: Preview is created but deployment fails.
Solutions: Check the preview deployment logs in the Ryvn
dashboard, verify all required inputs are provided, ensure the target environment has sufficient resources, and check
for configuration errors in the blueprint.
Preview Not Updating
Preview Not Updating
Problem: New commits don’t trigger preview updates.
Solutions: Verify GitHub webhook is properly configured, check that commits are pushed to the correct branch, ensure the preview system is running and healthy, and check for any rate limiting or webhook delivery issues.