|
1 | 1 | --- |
2 | | -title: GitOps with VCS Integration |
| 2 | +title: GitOps |
3 | 3 | --- |
4 | 4 |
|
5 | | -## Built-in GitOps |
| 5 | +Bytebase offers a database-as-code workflow, enabling you to manage database changes directly through your version control system (VCS). |
6 | 6 |
|
7 | | -### Prerequisites |
| 7 | +Bytebase provides two GitOps workflows: |
8 | 8 |
|
9 | | -- Configure [External URL](/docs/get-started/install/external-url). |
10 | | -- VCS and Bytebase are network reachable from each other. |
11 | | - - VCS needs to push webhook to Bytebase. |
12 | | - - Bytebase needs to fetch file content from VCS. |
13 | | - |
14 | | -### Workflow |
15 | | - |
16 | | - |
17 | | - |
18 | | -The built-in Bytebase GitOps workflow is **opinionated** for the typical use case: |
19 | | - |
20 | | -- It imposes a [naming convention on the migration file](/docs/vcs-integration/create-migration-files/). |
21 | | -- It only creates Bytebase rollout issue when the migration file is **merged** into the target branch. |
22 | | - Under the hood, it creates a webhook in the linked repository to observe the merge event. |
23 | | -- If you have successfully rolled out the issue and you want to make further change based on that migration file, you need to create a new migration file instead of editing the original one inline. |
| 9 | +- [Simple GitOps](/docs/vcs-integration/simple/overview): Opinionated and restricted for the simple use case. |
| 10 | +- [Custom GitOps](/docs/vcs-integration/custom/overview): Fully customizable via the Bytebase API. |
24 | 11 |
|
25 | 12 | <HintBlock type="info"> |
26 | 13 |
|
27 | | -You can check this [demo issue](https://demo.bytebase.com/projects/gitops-project/issues/106) to see what it looks like after the setup. This issue is created by Bytebase after the [PR is merged](https://github.com/s-bytebase/hr-sample/pull/17). |
| 14 | +If you manage database changes for multiple teams or have any branching strategy beyond the most basic, you will be likely need the [Custom GitOps](/docs/vcs-integration/custom/overview) workflow. |
28 | 15 |
|
29 | 16 | </HintBlock> |
30 | | - |
31 | | -The built-in GitOps setup contains 3 steps: |
32 | | - |
33 | | -1. [Add Git Provider](/docs/vcs-integration/add-git-provider) |
34 | | -1. [Add GitOps Connector in Project](/docs/vcs-integration/add-gitops-connector) |
35 | | -1. [Create Migration Files](/docs/vcs-integration/create-migration-files) |
36 | | - |
37 | | -## Custom GitOps with API |
38 | | - |
39 | | -If the built-in workflow is not suitable, you can opt to [Bytebase API](/docs/api/overview/) to fully customize the GitOps workflow to |
40 | | -integrate with your CI pipeline. |
41 | | - |
42 | | -<TutorialBlock url="/docs/tutorials/github-ci/" title="Automating Database Schema Change workflow Using GitHub Actions" /> |
0 commit comments