Requesting an environment using ChatOps

1 minute read

After CloudBees Previews is installed and configured, you can use it to create preview environments.

An independent CI pipeline must build and push the reviewable images in parallel. CloudBees Previews does not build them.

To create a preview environment, you must first commit a change to a source repository that you have enabled for CloudBees Previews and create a pull request (PR). Then, simply enter a /preview <context> comment on the PR. Your comment on the PR triggers CloudBees Previews to create the requested preview.

You can configure CloudBees Previews to automatically create and update your environments, so you do not have to post a comment on the PR.

You can specify any preview context that you added to the .preview.yaml configuration file. Use default or do not include a context if you want to request a preview using the default context.

PR comment in GitHub
Figure 1. PR comment in GitHub builds a preview of a context named 'docs'

CloudBees Previews replies via your SCM provider with a comment that contains the link to your preview environment.