|
1 | 1 | # Javabuilder CI/CD
|
2 |
| -## CI/CD Implementation |
| 2 | +## CI/CD Implementation Overview |
3 | 3 |
|
4 | 4 | There are three phases of the CI/CD configuration. They are best explained in reverse order from the way they flow in practice.
|
5 | 5 |
|
@@ -34,17 +34,30 @@ Finally, all of the above need some Roles to exist in the AWS accounts before we
|
34 | 34 | * "deploy-setup.sh" - Shell script to create/update this stack
|
35 | 35 | * "setup.template.yml" - AWS resources for the Setup infrastructure
|
36 | 36 |
|
37 |
| -## Deploying an entirely new Javabuilder |
| 37 | +## Deploying CI/CD resources |
| 38 | + |
| 39 | +### Deploying the `main` CI/CD Pipeline |
| 40 | + |
| 41 | +1. Create/Update the Setup stack (one time, or when changes to the Setup stack occur) |
| 42 | + `cicd/1-setup/deploy-cicd-dependencies.sh` (with elevated AWS permissions) |
| 43 | +2. Create/Update the CI/CD stack (one time, or when changes to the CI/CD stack occur) |
| 44 | + `cicd/2-cicd/deploy-cicd.sh` |
| 45 | +3. Trigger an update of the Pipeline by doing one of the following. |
| 46 | + 1. Merge a PR |
| 47 | + 2. Push a commit to `main` |
| 48 | + 3. Press the "Release Change" button on the Pipeline overview page in the AWS Console. |
| 49 | + |
| 50 | +### Deploying a CI/CD pipeline for a different branch |
38 | 51 |
|
39 | 52 | By setting the `TARGET_BRANCH` you can create a new CI/CD pipeline that watches for PR's and changes to the specified branch, deploying a Test and Production environment just like the standard pipeline.
|
40 | 53 |
|
41 | 54 | ```
|
42 |
| -TARGET_BRANCH=mybranch MODE=adhoc cicd/2-cicd/deploy-cicd.sh |
| 55 | +TARGET_BRANCH=mybranch cicd/2-cicd/deploy-cicd.sh |
43 | 56 | ```
|
44 | 57 |
|
45 |
| -## Deploying an Adhoc environment |
| 58 | +### Deploying an Adhoc environment |
46 | 59 |
|
47 |
| -You can create an Adhoc environment by setting the `MODE` flag on the cicd deploy script. This will create a CI/CD pipeline that will watch for updates to your `TARGET_BRANCH`. |
| 60 | +You can create an Adhoc environment by setting the `MODE` flag on the cicd deploy script. This will create a CI/CD pipeline that will watch for updates to your `TARGET_BRANCH`. The difference between a standard deployment and an adhoc pipeline can be seen in "cicd.template.yml" by following where the `Conditions` are used. In short, an adhoc creates an adhoc environment using "adhoc.config.yml", while a standard deployment will create a Test environment and a Prod environment using the relevent config files. |
48 | 61 |
|
49 | 62 | ```
|
50 | 63 | TARGET_BRANCH=mybranch MODE=adhoc cicd/2-cicd/deploy-cicd.sh
|
|
0 commit comments