Skip to main content
This guide covers generating the CI workflow files and the setup requirements for connecting Version Control Systems (VCS) with Bytebase.
For understanding network patterns and external access options, see the Network Architecture guide.

Guided Setup

In your project, go to CI/CD > Releases and click Set up GitOps. Once the project has GitOps changes, the button reads GitOps setup. Setup asks which databases to deploy to and which workload identity the workflow signs in as, then generates the workflow files for you to copy into your repository: Once the files are on the default branch, each pull request or merge request that changes the migration folder gets a Bytebase review comment, and merging it deploys. The generated workflows run versioned migration files, so file names must start with a version number. See file naming. Setup generates files for GitHub Actions and GitLab CI only. On another CI/CD platform, write the workflow yourself from the examples in the migration-based and state-based workflow guides.
The files use the workspace External URL as the Bytebase address. Until a workspace admin sets it, the files show a placeholder and cannot be copied.
A coding agent connected through MCP can do the same from your repository: it reads the repository, asks which databases to deploy to, and writes the same files.

Bytebase Cloud

No installation required for cloud VCS providers:
  • GitHub.com
  • GitLab.com
  • Bitbucket Cloud
  • Azure DevOps Services
These services connect directly to Bytebase Cloud.

Self-Hosted GitLab

  • Install a GitLab Runner on your GitLab server
  • Ensure your VPC firewall rules allow connections between Self-Hosted GitLab and Bytebase Cloud

bytebase-action Version Compatibility

Use a bytebase-action image that matches your Bytebase deployment:
  • For Bytebase Cloud, use bytebase/bytebase-action:cloud.
  • For self-hosted Bytebase, use bytebase/bytebase-action:<server-version>, for example bytebase/bytebase-action:3.14.0.
bytebase-action check and bytebase-action rollout verify compatibility before running. Cloud action builds must not be newer than the Bytebase Cloud server build and must be no more than 7 days behind it. Self-hosted action builds must use the same major version and be no more than 2 minor versions behind the Bytebase server; newer action builds are not compatible with older servers.

Bytebase Self-Host

Self-hosted Bytebase requires specific setup based on your VCS provider.

Cloud VCS Providers

When using cloud VCS with self-hosted Bytebase, you need a self-hosted runner: GitHub.com GitLab.com
  • Install a GitLab Runner
  • Register runner with your GitLab.com project
Bitbucket Cloud Azure DevOps Services

Self-Hosted GitLab

  • Install a GitLab Runner on your GitLab server
  • Ensure VPC connectivity between GitLab and Bytebase servers
  • Network policies allow communication
  • If your GitLab runner lacks internet access, pre-load the bytebase-action Docker image

Local Testing

To expose local Bytebase for testing with cloud VCS services, use reverse proxy tools like ngrok. See Network Architecture guide for setup details.
For development and testing only. Never use in production.