GitOps SQL Review CI

Set up SQL Review CI

This feature requires the GitOps Workflow. You can follow GitOps Workflow to set up.


Below use GitLab as an example. GitHub works in a similar way.

When the box Enable SQL Review CI via GitLab CI is checked, Bytebase will create a merge request (MR) for your repository to set up the SQL review CI, and redirect you to the MR page. To finish the setup, you should review and merge this MR.



After the setup, in every MR, the SQL review policy will check against changed files matching the file path template.

SQL Review CI via GitHub Action


SQL Review CI via GitLab CI


And you can follow the doc Create Schema Review Policy to create the SQL review policy.

GitOps CI in private networks

If you can not pull from the Docker Hub Container Registry, you can configure your CI/CD jobs to use the images from your private container registry, following Access an image from a private Container Registry.

If you don't have a private container registry, you can just use the one from your self-hosted GitLab, see GitLab Container Registry.

MyBatis3 Mapper SQL Review CI - Beta

After enabling SQL-Review CI, Bytebase will attempt to review MyBatis 3 mapper files. When the changed file includes a MyBatis 3 mapper files, Bytebase will search for a MyBatis3 config files in the same and parent directories. Once found, Bytebase will match the environment id in the config file with the *environment name** in Bytebase. If there is a matching environment, Bytebase will apply that environment's SQL Review policy.


Edit this page on GitHub

Subscribe to Newsletter

By subscribing, you agree with Bytebase's Terms of Service and Privacy Policy.