Skip to content

Commit 3602d55

Browse files
authored
Documentation improvements
1 parent 7890c19 commit 3602d55

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@
22

33
📺 [Recording from live demo at PlanetScale Happy-Half-Hour](https://youtu.be/l3oe7srRUZw?t=610)
44

5-
Ever wanted to accomplish a complex database workflow with [pscale CLI](https://github.com/planetscale/cli) and needed a way to automate operations like [database branch](https://docs.planetscale.com/concepts/branching) creation or [schema change requests](https://planetscale.com/blog/building-planetscale-with-planetscale) merges? Interested in using the PlanetScale database branching, approval and merging features directly out of your pull/merge requests?
6-
7-
![image](https://user-images.githubusercontent.com/1872314/149749143-16a484ec-7ebf-41e3-9d93-c81c24876b1e.png)
8-
9-
This is a collection of helper scripts and building blocks around the PlanetScale CLI to
10-
* attach, create, update, approve, merge and delete PlanetScale branches and deploy requests directly from your Pull Requests (see [IssueOps section](#issue-ops-based-workflows))
5+
This is a collection of GitHub Workflows and general purpose CI/CD helper scripts around [PlanetScale's CLI](https://github.com/planetscale/cli) to
6+
* [attach, create, update, approve, merge and delete](#issue-ops-based-workflows) PlanetScale branches and deploy requests directly from your Pull Requests
117
* [wait for branch creation to be completed](.pscale/cli-helper-scripts/wait-for-branch-readiness.sh)
128
* [wait for deploy requests to be successfully merged](.pscale/cli-helper-scripts/wait-for-deploy-request-merged.sh) (and get an update on the current migration status)
139
* [DB connection string creation/parsing and extending scope of service tokens](.pscale/cli-helper-scripts/create-database.sh)
14-
* examples on how create branches and deploy requests ([branches](.pscale/cli-helper-scripts/add-operation-column-and-index.sh), [credentials](.pscale/cli-helper-scripts/create-database.sh), [deploy requests](.pscale/cli-helper-scripts/merge-latest-open-deploy-request.sh))
10+
* examples on how to create branches and deploy requests ([branches](.pscale/cli-helper-scripts/add-operation-column-and-index.sh), [credentials](.pscale/cli-helper-scripts/create-database.sh), [deploy requests](.pscale/cli-helper-scripts/merge-latest-open-deploy-request.sh)) in any CI/CD environment
1511
* [creating one-time links](.pscale/cli-helper-scripts/create-branch-connection-string.sh) with connection info for feature branches that correspond to your preview environments
1612
* [run pscale from a Docker container](.pscale/cli-helper-scripts/use-pscale-docker-image.sh) and still use your local config files, service tokens and port forwarding
1713
* [delete databases](.pscale/cli-helper-scripts/remove-database.sh)
1814

15+
### IssueOps Example
16+
17+
![image](https://user-images.githubusercontent.com/1872314/149749143-16a484ec-7ebf-41e3-9d93-c81c24876b1e.png)
18+
([example PR](https://github.com/jonico/pscale-cli-helper-scripts/pull/11))
19+
1920
## Issue-Ops based workflows
2021

2122
### Installation
@@ -34,6 +35,8 @@ git push
3435
You can create a database branch and deploy request in an [already existing Pull Request](https://github.com/jonico/pscale-cli-helper-scripts/pull/2) using `/ps-create`:
3536
![image](https://user-images.githubusercontent.com/1872314/143734380-132bdd39-b4bc-4ec0-b1e8-79d31748542c.png)
3637

38+
See [configuration section](#configuration) for an explanation of the environment variables to set to specify a PlanetScale org and database different from the default settings.
39+
3740
### /ps-attach: Attach existing PlanetScale branch or Deploy Request to your PR
3841

3942
If the PlanetScale deploy request or database branch and your pull request both exist already, you can use the `/ps-attach` command, followed by the PlanetScale URL to your branch/DR:
@@ -84,10 +87,14 @@ In case you like to see those helper scripts in action without any further manua
8487

8588
![image](https://user-images.githubusercontent.com/1872314/142615142-e60164a0-f441-47ee-b92e-ef20e22aca81.png)
8689

90+
See [configuration section](#configuration) for an explanation of the environment variables to set to specify a PlanetScale org and database different from the default settings.
91+
8792
5. When you run the workflows, follow the output where it will ask you to authenticate to PlanetScale by clicking the displayed links.
8893

8994
![image](https://user-images.githubusercontent.com/1872314/142614600-83d06471-b0bd-4c7a-81bb-d8836e547e78.png)
9095

9196
If you start the ["Create branch/PR for schema change"](https://github.com/jonico/pscale-cli-helper-scripts/actions/workflows/create-db-branch-and-pr-dr.yml) workflow, a pull request like [this one](https://github.com/jonico/pscale-cli-helper-scripts/pull/2) will be created that is associated with a PlanetScale deploy request and the desired schema changes.
9297

9398
![image](https://user-images.githubusercontent.com/1872314/144895567-85937eb8-25eb-4066-9863-8e834a108127.png)
99+
100+
## Configuration

0 commit comments

Comments
 (0)