Skip to content

Commit e807a46

Browse files
d-bytebaseclaude
andauthored
docs: reorganize GitOps workflow documentation (#877)
- Create new "Develop" page with filename requirements - Move CI platform integrations to "Release" page - Simplify overview with focus on core workflow - Update navigation structure in docs.json 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]>
1 parent 90269e8 commit e807a46

File tree

4 files changed

+94
-135
lines changed

4 files changed

+94
-135
lines changed

mintlify/docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@
128128
"group": "GitOps Workflow",
129129
"pages": [
130130
"gitops/overview",
131+
"gitops/develop",
131132
"gitops/sql-review-ci",
132133
"gitops/release"
133134
]

mintlify/gitops/develop.mdx

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: Develop
3+
---
4+
5+
## Filename Requirements
6+
7+
To ensure proper version control and execution, your SQL migration filenames must follow a specific structure. Each filename consists of three main parts: a **Version**, a **Description**, and an optional **Change Type Suffix**.
8+
9+
`<Version>_<Description>_<Suffix>.sql`
10+
11+
### Versioning Format
12+
13+
Bytebase supports both semantic versioning and simple timestamp-based versions. The version number is crucial for ordering migrations correctly.
14+
15+
The version must begin with a number. A `v` or `V` prefix is optional.
16+
17+
**Valid Version Examples:**
18+
19+
- `202501150900_add_user_table.sql`
20+
- `v1.2.3_description.sql`
21+
- `V2_add_users_table.sql`
22+
- `1.0_initial_schema.sql`
23+
24+
### Change Type Suffixes
25+
26+
You can add a suffix to the filename to specify the change type. **If the suffix is omitted, the file will be treated as the default `DDL` type.** The suffix is added to the end of the filename, just before the `.sql` extension.
27+
28+
- **DDL (Default)**
29+
30+
- Used for standard schema changes (Data Definition Language). This is the default type used when no suffix is present.
31+
- **Example**: `v1.0_create_table.sql`
32+
33+
- **DML**
34+
35+
- Used for data manipulations (Data Manipulation Language).
36+
- Add the `_dml` suffix.
37+
- **Example**: `v1.0_insert_data_dml.sql`
38+
39+
- **Ghost**
40+
- Used for schema changes performed using the `gh-ost` tool.
41+
- Add the `_ghost` suffix.
42+
- **Example**: `v1.0_alter_table_ghost.sql`

mintlify/gitops/overview.mdx

Lines changed: 1 addition & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Overview
44

55
Bytebase offers a database-as-code workflow, enabling you to manage database changes directly through your version control system (VCS).
66

7-
Bytebase GitOps workflow is built upon the [Bytebase API](/integrations/api/overview). It provides the ultimate flexibility to customize the GitOps workflow to integrate with your CI/CD pipeline.
7+
Bytebase provides pre-built actions for popular CI/CD platforms. For custom requirements, you can build your own pipeline using the [Bytebase API](/integrations/api/overview).
88

99
## Capabilities
1010

@@ -18,13 +18,6 @@ Bytebase GitOps integration provides two core capabilities:
1818
- **Progressive deployments** - Automated rollout across environments (test → staging → production)
1919
- **Multi-database support** - Apply changes across multiple databases with batch operations
2020

21-
### SQL Review
22-
23-
- **Automated validation** - Automatically check SQL files against configurable review policies
24-
- **Quality and compliance checks** - Validate for performance issues, security concerns, and best practices
25-
- **PR integration** - Review results posted directly as pull request comments
26-
- **Merge protection** - Block merges when critical issues are detected
27-
- **Database-specific rules** - Tailored validation for different database engines
2821

2922
## GitOps Workflow
3023

@@ -62,106 +55,3 @@ The release follows your configured deployment pipeline:
6255
- Each deployment is tracked with timing and status
6356

6457
**Important**: When deploying a release, Bytebase automatically detects which migrations have already been applied to the target database and skips them. This ensures safe re-deployment and allows the same release to be deployed multiple times without errors.
65-
66-
## Requirements
67-
68-
## Filename Requirements
69-
70-
To ensure proper version control and execution, your SQL migration filenames must follow a specific structure. Each filename consists of three main parts: a **Version**, a **Description**, and an optional **Change Type Suffix**.
71-
72-
`<Version>_<Description>_<Suffix>.sql`
73-
74-
### Versioning Format
75-
76-
Bytebase supports both semantic versioning and simple timestamp-based versions. The version number is crucial for ordering migrations correctly.
77-
78-
The version must begin with a number. A `v` or `V` prefix is optional.
79-
80-
**Valid Version Examples:**
81-
82-
- `202501150900_add_user_table.sql`
83-
- `v1.2.3_description.sql`
84-
- `V2_add_users_table.sql`
85-
- `1.0_initial_schema.sql`
86-
87-
### Change Type Suffixes
88-
89-
You can add a suffix to the filename to specify the change type. **If the suffix is omitted, the file will be treated as the default `DDL` type.** The suffix is added to the end of the filename, just before the `.sql` extension.
90-
91-
- **DDL (Default)**
92-
93-
- Used for standard schema changes (Data Definition Language). This is the default type used when no suffix is present.
94-
- **Example**: `v1.0_create_table.sql`
95-
96-
- **DML**
97-
98-
- Used for data manipulations (Data Manipulation Language).
99-
- Add the `_dml` suffix.
100-
- **Example**: `v1.0_insert_data_dml.sql`
101-
102-
- **Ghost**
103-
- Used for schema changes performed using the `gh-ost` tool.
104-
- Add the `_ghost` suffix.
105-
- **Example**: `v1.0_alter_table_ghost.sql`
106-
107-
## GitHub Actions
108-
109-
<Card
110-
title="Tutorial: Database GitOps with GitHub Actions"
111-
icon="graduation-cap"
112-
href="/tutorials/gitops-github-workflow/"
113-
horizontal
114-
/>
115-
116-
<Note>
117-
118-
To reach your self-hosted Bytebase from GitHub Actions, you can choose either options:
119-
120-
1. Tunnel GitHub Actions using [Cloudflare Zero Trust](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/) with [Cloudflare Warp GitHub Actions](https://github.com/marketplace/actions/setup-cloudflare-warp).
121-
122-
1. Use [self-hosted runners](https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners).
123-
124-
</Note>
125-
126-
Bytebase provides pre-built [GitHub Actions](https://github.com/marketplace?query=bytebase&type=actions) to ease the GitHub integration.
127-
128-
## Azure DevOps Pipeline
129-
130-
<Card
131-
title="Tutorial: Database GitOps with Azure DevOps Pipeline"
132-
icon="graduation-cap"
133-
href="/tutorials/gitops-azure-devops-workflow/"
134-
horizontal
135-
/>
136-
137-
## GitLab CI
138-
139-
<Card
140-
title="Tutorial: Database GitOps with GitLab CI"
141-
icon="graduation-cap"
142-
href="/tutorials/gitops-gitlab-workflow/"
143-
horizontal
144-
/>
145-
146-
<Note>
147-
148-
If you're using **self-hosted GitLab** in an internal network:
149-
150-
1. You’ll need to [manually load the `bytebase/bytebase-action` image](/tutorials/gitops-gitlab-workflow#use-bytebase-action-in-an-offline-gitlab-runner) into your internal Docker registry.
151-
152-
1. Set the [`clone_url` in GitLab Runner](/tutorials/gitops-gitlab-workflow#resolve-gitlab-clone-redirect-in-internal-network) to avoid redirection to external addresses.
153-
154-
</Note>
155-
156-
## Bitbucket Pipelines
157-
158-
<Card
159-
title="Tutorial: Database GitOps with Bitbucket Pipelines"
160-
icon="graduation-cap"
161-
href="/tutorials/gitops-bitbucket-workflow/"
162-
horizontal
163-
/>
164-
165-
## API
166-
167-
If the pre-built GitHub Actions do not meet your needs or you want to integrate with other VCSs, you can use the [Bytebase API](/integrations/api/overview) to build your own GitOps workflow.

mintlify/gitops/release.mdx

Lines changed: 50 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,67 @@
22
title: Release
33
---
44

5-
A release is an immutable, deployable artifact that contains database changes. It serves as the database equivalent of a Docker image in modern CI/CD pipelines.
5+
Bytebase integrates with popular CI/CD platforms to automate database releases through GitOps workflows.
66

7-
## Overview
7+
## Release Workflow
88

9-
In Bytebase's GitOps workflow, a release is automatically created when changes are merged to your main branch. It packages all SQL migration files into a single deployable unit that can be progressively rolled out across your database environments.
9+
When triggered by your CI/CD pipeline, Bytebase automatically creates a **release** - an immutable package containing all your SQL migration files. This release can then be progressively deployed across your database environments (test → staging → production), ensuring consistent and traceable database changes.
1010

11-
## Key Characteristics
11+
## GitHub Actions
1212

13-
- **Immutable** - Once created, a release cannot be modified, ensuring deployment consistency
14-
- **Version-controlled** - Each release is tied to a specific VCS commit for full traceability
15-
- **Environment-agnostic** - The same release can be deployed across test, staging, and production
16-
- **Auditable** - Complete history of creation, deployment, and rollback operations
17-
- **Idempotent** - Bytebase automatically detects and skips already applied migrations, preventing duplicate executions
13+
<Card
14+
title="Tutorial: Database GitOps with GitHub Actions"
15+
icon="graduation-cap"
16+
href="/tutorials/gitops-github-workflow/"
17+
horizontal
18+
/>
1819

19-
## Benefits
20+
<Note>
2021

21-
### Consistency
22+
To reach your self-hosted Bytebase from GitHub Actions, you can choose either options:
2223

23-
The same release deployed to test is exactly what gets deployed to production - no manual SQL copying or modification.
24+
1. Tunnel GitHub Actions using [Cloudflare Zero Trust](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/) with [Cloudflare Warp GitHub Actions](https://github.com/marketplace/actions/setup-cloudflare-warp).
2425

25-
### Idempotent Deployment
26+
1. Use [self-hosted runners](https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners).
2627

27-
Bytebase tracks which migrations have been applied to each database. When deploying a release:
28+
</Note>
2829

29-
- Already applied migrations are automatically skipped
30-
- Only new migrations are executed
31-
- Safe to re-deploy the same release multiple times
32-
- No risk of duplicate schema changes or data corruption
30+
Bytebase provides pre-built [GitHub Actions](https://github.com/marketplace?query=bytebase&type=actions) to ease the GitHub integration.
3331

34-
### Compliance
32+
## Azure DevOps Pipeline
3533

36-
- Every change is reviewed before release creation
37-
- Deployment requires appropriate approvals
38-
- Full audit trail for regulatory requirements
34+
<Card
35+
title="Tutorial: Database GitOps with Azure DevOps Pipeline"
36+
icon="graduation-cap"
37+
href="/tutorials/gitops-azure-devops-workflow/"
38+
horizontal
39+
/>
3940

40-
### Integration
41+
## GitLab CI
42+
43+
<Card
44+
title="Tutorial: Database GitOps with GitLab CI"
45+
icon="graduation-cap"
46+
href="/tutorials/gitops-gitlab-workflow/"
47+
horizontal
48+
/>
49+
50+
<Note>
51+
52+
If you're using **self-hosted GitLab** in an internal network:
53+
54+
1. You'll need to [manually load the `bytebase/bytebase-action` image](/tutorials/gitops-gitlab-workflow#use-bytebase-action-in-an-offline-gitlab-runner) into your internal Docker registry.
55+
56+
1. Set the [`clone_url` in GitLab Runner](/tutorials/gitops-gitlab-workflow#resolve-gitlab-clone-redirect-in-internal-network) to avoid redirection to external addresses.
57+
58+
</Note>
59+
60+
## Bitbucket Pipelines
61+
62+
<Card
63+
title="Tutorial: Database GitOps with Bitbucket Pipelines"
64+
icon="graduation-cap"
65+
href="/tutorials/gitops-bitbucket-workflow/"
66+
horizontal
67+
/>
4168

42-
Releases integrate seamlessly with existing CI/CD tools, treating database changes with the same rigor as application deployments.

0 commit comments

Comments
 (0)