-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
80 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# 10up Projects | ||
# 10up Projects (BETA) | ||
|
||
**This subcommand is currently in BETA** | ||
|
||
10up Toolkit provides a number of utlities for creating, managing, and deploying 10up specific projects. | ||
|
||
|
@@ -32,13 +34,15 @@ environments: | |
deploy_to: "[email protected]:/var/www/my-project" | ||
deploy_to_subdir: "wp-content/" | ||
deploy_from: "./" | ||
deploy_type: "rsync" | ||
url: "https://environmenturl.com" | ||
staging: | ||
branch: "staging" | ||
wordpress_version: "6.4" | ||
deploy_to: "[email protected]:/var/www/my-project" | ||
deploy_to_subdir: "wp-content/" | ||
deploy_from: "./" | ||
deploy_type: "rsync" | ||
url: "https://environmenturl.com" | ||
``` | ||
|
||
|
@@ -52,6 +56,8 @@ environments: | |
|
||
In this scenario, `deploy_from` would be set to `wp` and `deploy_to_subdir` would be `./`. | ||
|
||
`deploy_type` currently supports `rsync`, `wpe` (WP Engine), and `pantheon`. It defaults to `rsync`. If WPE or Pantheon is choosen, `deploy_to` should contain a Git URL. More deploy types will be added in the future. | ||
|
||
The following are additional optional variables that allow you to use custom scripts different than the ones provided by 10up Toolkit. You shouldn't need to use these unless you are doing something super custom. All these paths are relative from the root of your project. | ||
|
||
```yaml | ||
|
@@ -89,4 +95,6 @@ This command creates a payload directory of the built project (including WordPre | |
10up-toolkit project generate-ci [--confirm] | ||
``` | ||
|
||
This command generates necessary CI files. For GitLab, this would be `.gitlab-ci.yml`. | ||
This command generates necessary CI files. For GitLab, this would be `.gitlab-ci.yml`. Right now this only supports GitLab but we will add support for GitHub in the future. | ||
|
||
**Note that generating CI files is currently in alpha and may require manual editing to fix issues.** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
deploy_production: | ||
extends: .wordpress-deploy-pantheon-v2 | ||
environment: | ||
name: Production | ||
url: {{url}} | ||
variables: | ||
MULTI_DEV_ENVIRONMENT: "{{branch}}" | ||
WORDPRESS_VERSION: {{wordpress_version}} | ||
GIT_URL: {{deploy_to}} | ||
EXCLUDES: {{deploy_file_excludes}} | ||
allow_failure: false | ||
only: | ||
refs: | ||
- {{branch}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
deploy_{{branch}}: | ||
extends: .wordpress-deploy-pantheon-v2 | ||
environment: | ||
name: {{branch}} | ||
url: {{url}} | ||
variables: | ||
MULTI_DEV_ENVIRONMENT: "{{branch}}" | ||
WORDPRESS_VERSION: {{wordpress_version}} | ||
GIT_URL: {{deploy_to}} | ||
EXCLUDES: {{deploy_file_excludes}} | ||
allow_failure: false | ||
only: | ||
refs: | ||
- {{branch}} |
12 changes: 7 additions & 5 deletions
12
packages/toolkit/project/gitlab/deploy-configs/rsync-production.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
deploy_production: | ||
stage: deploy | ||
extends: .wordpress-deploy-rsync | ||
environment: | ||
name: Production | ||
url: {{url}} | ||
script: | ||
- rsync -vrxc --delete --exclude-from={{deploy_file_excludes}} ./payload/ {{deploy_to}}/{{deploy_to_subdir}}/ | ||
only: | ||
- {{branch}} | ||
variables: | ||
WORDPRESS_VERSION: {{wordpress_version}} | ||
DESTINATION: {{deploy_to}} | ||
SUBDIR: {{deploy_to_subdir}} | ||
EXCLUDES: {{deploy_file_excludes}} | ||
only: | ||
refs: | ||
- {{branch}} |
16 changes: 9 additions & 7 deletions
16
packages/toolkit/project/gitlab/deploy-configs/rsync-staging.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
deploy_stage: | ||
deploy_{{branch}}: | ||
stage: deploy | ||
extends: .wordpress-deploy-rsync | ||
environment: | ||
name: Staging | ||
name: {{branch}} | ||
url: {{url}} | ||
script: | ||
- rsync -vrxc --delete --exclude-from={{deploy_file_excludes}} ./payload/ {{deploy_to}}/{{deploy_to_subdir}}/ | ||
only: | ||
- {{branch}} | ||
variables: | ||
WORDPRESS_VERSION: {{wordpress_version}} | ||
DESTINATION: {{deploy_to}} | ||
SUBDIR: {{deploy_to_subdir}} | ||
EXCLUDES: {{deploy_file_excludes}} | ||
only: | ||
refs: | ||
- {{branch}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/toolkit/project/gitlab/deploy-configs/wpe-staging.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters