Skip to content

Commit 75dd44e

Browse files
cleanup and update readme
1 parent 1bdab03 commit 75dd44e

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

cicd/2-cicd/deploy-cicd.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ if [[ $(aws sts get-caller-identity --query Arn --output text) =~ "assumed-role/
1414
set -- "$@" --role-arn "arn:aws:iam::$(aws sts get-caller-identity --query Account --output text):role/admin/CloudFormationService"
1515
fi
1616

17-
1817
# Default to main branch, but support pipelines using other branches
1918
TARGET_BRANCH=${TARGET_BRANCH-'main'}
2019
if [ "$TARGET_BRANCH" == "main" ]

cicd/README.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Javabuilder CI/CD
2-
## CI/CD Implementation
2+
## CI/CD Implementation Overview
33

44
There are three phases of the CI/CD configuration. They are best explained in reverse order from the way they flow in practice.
55

@@ -34,17 +34,30 @@ Finally, all of the above need some Roles to exist in the AWS accounts before we
3434
* "deploy-setup.sh" - Shell script to create/update this stack
3535
* "setup.template.yml" - AWS resources for the Setup infrastructure
3636

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
3851

3952
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.
4053

4154
```
42-
TARGET_BRANCH=mybranch MODE=adhoc cicd/2-cicd/deploy-cicd.sh
55+
TARGET_BRANCH=mybranch cicd/2-cicd/deploy-cicd.sh
4356
```
4457

45-
## Deploying an Adhoc environment
58+
### Deploying an Adhoc environment
4659

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.
4861

4962
```
5063
TARGET_BRANCH=mybranch MODE=adhoc cicd/2-cicd/deploy-cicd.sh

0 commit comments

Comments
 (0)