Skip to content

Branch Preview

Branch Previews are an integral part of the Coherence developer experience. Popularized for the frontend by Platform-as-a-Service tools like Vercel and Netlify, and for full-stack apps by Heroku Review Apps, Coherence now makes the same thing possible in your own cloud systems, for full-stack apps, without forcing you to glue them together yourself.

Where do Branch Previews Deploy To?

You choose the collection that previews will be created in when you choose the environment that they will clone their services and configuration from when they are created in your app setting.

What Resources do Branch Previews Deploy?

Some resources that are shared by all environments, and some resources that are deployed for each environment. Check the cnc flavor docs for more info. You get a database by default per environment in most cnc flavors, for example.

Branch Previews Lifecycle

Branch Previews are the concept on Coherence that determine if a Preview Environment is available and deployed, or not. Branch Previews have several stages in their lifecycle.

  • Active: this is the default initial status for a feature. This means that the cloud infrastructure for this environment is provisioned and if there has been at least one successful build, the environment should be available on the web at the URL on the environment defined within the feature's detail page.
  • Paused: after a configurable number of hours without a new build, a feature will be moved from active to paused and the infrastructure (excluding the database or database instance) will be removed from your cloud infrastructure. The next push to the branch, or a manual change to the status in the Coherence UI, will move the feature back into active status and re-provision the infrastructure. This is designed as a cost-savings measure for teams with long-lived branches and an intermittent need to test using the preview environment of the feature.
  • Archived: This status mean that the infrastructure, including that database or database instance, is deleted. The next push to any branch linked to the feature, will not have any effect on the feature status - manual action in the Coherence UI is required to change it to active or paused. Merging a PR and deleting the underlying git branch will automatically move a feature from active or paused to archived.