You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/ci/cdk/README.md
+82-65Lines changed: 82 additions & 65 deletions
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,7 @@ AWS-LC CI uses AWS CDK to define and deploy AWS resources (e.g. AWS CodeBuild, E
36
36
* step 4: click **Connect using OAuth** and **Connect to GitHub**.
37
37
* step 5: follow the OAuth app to grant access.
38
38
* Setup Python environment:
39
+
39
40
* From `aws-lc/tests/ci` run:
40
41
```shell
41
42
python -m pip install -r requirements.txt
@@ -83,75 +84,91 @@ To setup or update the CI in your account you will need the following IAM permis
83
84
* secretsmanager:GetSecretValue
84
85
85
86
### Pipeline Commands
86
-
Use these commands to deploy the CI pipeline. Any changes to the CI or Docker images will be updated automatically after the pipeline is deployed.
87
-
88
-
These commands are run from `aws-lc/tests/ci/cdk`.
89
-
90
-
[SKIP IF NO CROSS-ACCOUNT DEPLOYMENT] Give the pipeline account administrator access to the deployment account's CloudFormation. Repeat this step depending on how many deployment environment there are. You only need to run this step once when the pipeline is deploying to a new account for the first time.
To deploy production pipeline using default parameters:
111
-
```
112
-
./run-cdk.sh --action deploy-production-pipeline
113
-
```
87
+
Use the following commands to deploy the CI pipeline. Any changes to the CI or Docker images will be updated automatically after the pipeline is deployed.
88
+
89
+
1. Ensure you are in `aws-lc/tests/ci/cdk`
90
+
2. Export the relevant environment variables:
91
+
-`PIPELINE_ACCOUNT_ID`: the AWS account to host your pipeline
92
+
-`DEPLOY_ACCOUNT_ID`: the AWS account to deploy Docker images and CodeBuild CI tests to.
93
+
-`GITHUB_REPO_OWNER`: GitHub repo targeted by the pipeline (i.e, your personal Github account)
94
+
-`GITHUB_SOURCE_VERSION`: Git branch holding the latest pipeline code (default: main)
95
+
96
+
3.[SKIP IF NO CROSS-ACCOUNT DEPLOYMENT] Give the pipeline account administrator access to the deployment account's CloudFormation. Repeat this step depending on how many deployment environment there are. You only need to run this step once when the pipeline is deploying to a new account for the first time.
- To deploy production pipeline using default parameters:
121
+
```shell
122
+
./run-cdk.sh --action deploy-production-pipeline
123
+
```
124
+
125
+
**Note**: If this is your first time deploying the pipeline and it's failing on the Source stage, this is normal and expected, since you haven't given CodePipeline access to your repo.
126
+
To fix this:
127
+
1. Go to your Console > CodePipeline > Settings > Connections. You should see a pending connection named `AwsLcCiPipelineGitHubConnection`. Click on it.
128
+
2. Click on `Update Pending Connection.`
129
+
3. On the pop up, you would see an `App Installation - optional`. Click on `Install a new app` (or choose an existing app if you have one). This step is REQUIRED to allow CodePipeline to detect new events from your repo.
130
+
4. Click `Connect`. The connection status should become `Available` now
114
131
115
132
### CI Commands
116
133
Use these commands if you wish to deploy individual stacks instead of the entire pipeline.
117
134
118
-
These commands are run from `aws-lc/tests/ci/cdk`.
119
-
120
-
If not done previously, bootstrap cdk before running the commands below. Make sure that AWS_ACCOUNT_ID is the AWS account you wish to deploy the CI stacks to.
121
-
122
-
```shell
123
-
cdk bootstrap aws://${AWS_ACCOUNT_ID}/us-west-2
124
-
```
125
-
126
-
You may also need to request an increase to certain account quotas:
127
-
```shell
128
-
open https://${DEPLOY_REGION}.console.aws.amazon.com/servicequotas/home/services/ec2/quotas
129
-
```
130
-
***EC2-VPC Elastic IPs** = 20
131
-
132
-
Note: `GITHUB_REPO_OWNER` specifies the GitHub repo targeted by this CI setup.
0 commit comments