Skip to content

Commit

Permalink
docs: gitlab tut fixed (#469)
Browse files Browse the repository at this point in the history
  • Loading branch information
OP3ratordec authored Nov 19, 2024
1 parent b78baeb commit a99e7d8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ You may upgrade to Enterprise plan to explore more features.

Go to **Environments** > **Prod**, Find **Rollout policy** section, and choose **Manual rollout** > **Require rolling out by dedicated roles**.

![bb-env-prod-manual-rollout](/content/docs/share/tutorials/bb-env-prod-manual-rollout.webp)
![bb-env-prod-manual-rollout](/content/docs/tutorials/share/bb-env-prod-manual-rollout.webp)

### Custom Approval

1. Go to **CI/CD** > **Custom Approval**. Set `Project Owner -> DBA` as Approval flow for **DDL** > **High Risk**.

![bb-custom-approval](/content/docs/share/tutorials/bb-custom-approval.webp)
![bb-custom-approval](/content/docs/tutorials/share/bb-custom-approval.webp)

1. Go to **CI/CD** > **Risk Center**. Click **Add rule** and click **Load** for the first template. Click **Add**.

![bb-risk-center-ddl-high](/content/docs/share/tutorials/bb-risk-center-ddl-high.webp)
![bb-risk-center-ddl-high](/content/docs/tutorials/share/bb-risk-center-ddl-high.webp)

### Schema Drift

Expand All @@ -31,6 +31,6 @@ Bytebase has built-in [schema drift detection](/docs/change-database/drift-detec

1. Go back to Bytebase Console, and click **Databases** > `employee` under `Prod`. Click **Sync Now**. After seeing the success message, refresh the page. You'll see the schema drift. You may configure auto scan on instance detail page to avoid manual sync.

![bb-db-schema-drift](/content/docs/share/tutorials/bb-db-schema-drift.webp)
![bb-db-schema-drift](/content/docs/tutorials/share/bb-db-schema-drift.webp)

1. Go to **Database** > **Anomalies**, and you'll see the Schema drift there too.
2 changes: 1 addition & 1 deletion content/docs/share/tutorials/database-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DORA (DevOps Research & Assessment) [pointed out](https://cloud.google.com/archi

But how does it work, really? Here, we present our envisioned Database CI/CD workflow.

![database-devops-workflow](/content/docs/share/tutorials/cicd-workflow.webp)
![database-devops-workflow](/content/docs/tutorials/share/cicd-workflow.webp)

1. The developer creates a Pull Request containing the SQL script;
1. SQL Review CI is automatically triggered to review SQL and offers suggestions via a comment in the PR;
Expand Down
4 changes: 2 additions & 2 deletions content/docs/share/tutorials/sql-review-not-null.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
1. Go to **CI/CD > SQL Review** in workspace, choose `Prod` as the environment. Make sure a SQL review policy is attached and enabled on `Prod`.

![bb-sql-review](/content/docs/share/tutorials/bb-sql-review.webp)
![bb-sql-review](/content/docs/tutorials/share/bb-sql-review.webp)

1. Click **Edit**, click **PostgreSQL** tab. Make sure `Enforce "NOT NULL" constraints on columns` is enabled. This is to make sure the SQL Review can work.

![bb-sql-review-not-null](/content/docs/share/tutorials/bb-sql-review-not-null.webp)
![bb-sql-review-not-null](/content/docs/tutorials/share/bb-sql-review-not-null.webp)
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Here's a step-by-step tutorial on how to set up this Database CI/CD with GitLab

1. Go to `https://gitlab.com/` and create a new project `bb-gitops-2024`. Click **Create project**.

1. Go to Bytebase, go to the `Sample Project`. Click **Integration >GitOps** on the left and click **Add GitOps connector**. Choose `GitLab.com` (the git provider you just configured) and `Bytebase Sample/bb-gitops-2024` (the repository you just created).
1. Go to Bytebase, go to the `Sample Project`. Click **Integration > GitOps** on the left and click **Add GitOps connector**. Choose `GitLab.com` (the git provider you just configured) and `Bytebase Sample/bb-gitops-2024` (the repository you just created).

1. Keep the default settings for the remaining fields and click **Finish**. The gitops connector is created successfully.
![bb-gitops-gitlab-configure](/content/docs/tutorials/database-cicd-best-practice-with-gitlab/bb-gitops-gitlab-configure.webp)
Expand Down

0 comments on commit a99e7d8

Please sign in to comment.