Skip to content

Commit cf75c93

Browse files
add manual rollout (#524)
1 parent 6339162 commit cf75c93

File tree

7 files changed

+48
-1
lines changed

7 files changed

+48
-1
lines changed

content/docs/tutorials/github-release-cicd-workflow.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This tutorial demonstrates how to automate database release CI/CD using GitHub A
1414
- Set up a workflow where developers can submit SQL migration files to GitHub
1515
- Implement automated SQL review checks for pull requests
1616
- Automatically create releases in Bytebase after merging to the `main` branch and roll out to the database
17+
- Manually rollout the release to the database by stage (for **Pro or Enterprise plan**)
1718

1819
While this guide uses GitHub Actions, the same principles can be applied to other CI/CD platforms like GitLab CI, Bitbucket Pipelines, or Azure DevOps using the Bytebase API.
1920

@@ -211,6 +212,52 @@ To create migration files to trigger release creation, the files have to match t
211212

212213
![bb-manual-apply](/content/docs/tutorials/github-release-cicd-workflow/bb-manual-apply.webp)
213214

215+
## Step 5 - Manual Rollout for Pro or Enterprise Plan
216+
217+
If you have **Pro** or **Enterprise** plan, you can manually rollout the release to the database by stage.
218+
219+
1. Upgrade your Bytebase plan to **Pro** or **Enterprise** plan, assign the license to your instances.
220+
221+
1. Click **Environments** on the left sidebar, click **Prod** tab, set **Rollout Policy** as `Manual rollout by dedicated roles`.
222+
223+
1. Go to the `.github/workflows/bytebase-release-cicd.yml` file, uncomment the last line and commit the changes.
224+
225+
```yaml
226+
target-stage: 'Test Stage'
227+
```
228+
229+
1. You can find the stage name in the **Deployment Config** under `Sample Project`.
230+
231+
![bb-deployment-config](/content/docs/tutorials/github-release-cicd-workflow/bb-deployment-config.webp)
232+
233+
1. Create a new branch with this file, and create a pull request. Merge it to the `main` branch.
234+
235+
- 20250101003_create_table_t3_ddl.sql
236+
237+
```sql
238+
CREATE TABLE t3(id INT PRIMARY KEY NOT NULL);
239+
```
240+
241+
1. Go to the **Actions** tab, you can see the workflow run and pass. Expand the **Rollout** section, the rollout is created and the stage is skipped.
242+
243+
![gh-rollout-skip](/content/docs/tutorials/github-release-cicd-workflow/gh-rollout-skip.webp)
244+
245+
1. Click the link in the **Rollout** section, you will go to the **Rollout Pipeline** in Bytebase.
246+
247+
![bb-manual-rollout](/content/docs/tutorials/github-release-cicd-workflow/bb-manual-rollout.webp)
248+
249+
1. Click the arrow button, and click **Confirm**. The **Prod Stage** will be created.
250+
251+
![bb-confirm-add](/content/docs/tutorials/github-release-cicd-workflow/bb-confirm-add.webp)
252+
253+
1. Click into the script and click **Run**. The script will be applied to the prod database.
254+
255+
![bb-prod-run](/content/docs/tutorials/github-release-cicd-workflow/bb-prod-run.webp)
256+
257+
1. Go back to the **Rollout Pipeline** page, you can see the **Prod Stage** is completed.
258+
259+
![bb-rollout-done](/content/docs/tutorials/github-release-cicd-workflow/bb-rollout-done.webp)
260+
214261
## Summary
215262

216-
In this tutorial, you have learned how to create a release and then rollout to the database in Bytebase with GitHub Action. If you want to trigger a release creation with other git providers (e.g. GitLab, Bitbucket, Azure DevOps), you may customize the workflow file.
263+
Now you have learned how to create a release and then rollout to the database in Bytebase with GitHub Action. If you want to trigger a release creation with other git providers (e.g. GitLab, Bitbucket, Azure DevOps), you may customize the workflow file.
43.9 KB
Loading
53.6 KB
Loading
39.2 KB
Loading
43.4 KB
Loading
38.8 KB
Loading
65.1 KB
Loading

0 commit comments

Comments
 (0)