main
localhost:8080
.
<<YOURS>>.ngrok-free.app
.
https://<<YOURS>>.ngrok-free.app
.
https://<<YOURS>>.ngrok-free.app
as the External URL and click Confirm and update.
Workspace Admin
, and go to IAM & Admin > Users & Groups. Click + Add User, fill in with api-sample
, choose the Workspace DBA
role sufficient for this tutorial and click Confirm.
Sample Template
and click Next.
Prod
environment as the attached resources and click Confirm. Now the SQL review is enabled for the Prod
environment.
Prod
environment as above. In this demo, we would switch to enable it for Test
to fit the following GitLab CI workflow.
bitbucket-pipelines.yml
from https://bitbucket.org/p0nyyy/cicd/. It includes sql review and release creation.
bitbucket-pipelines.yml
, replace the variable in all 3 steps the values with your own and commit the changes.
api-example@service.bytebase.com
(the service account you created in the previous step)bitbucket-pipelines.yml
, pay attention to BYTEBASE_TARGETS
in deploy-to-test
stage. You should put all the databases including both Test
and Prod
environments. NOT ONLY the Test
database.
Test
-> test
and Production
-> prod
.
202505141650_create_table_t1.sql
.ddl
or dml
to indicate its change type. If it doesn’t end with any of the two, its change type is DDL by default.migration
directory:
sql-review
pipeline will be triggered. There will be a warning in the SQL review result.
release
pipeline will be triggered to create a release in Bytebase and then roll out automatically on test but waiting for approval on prod.
bytebase-action rollout ...
, you can follow the rollout link to Bytebase.