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: tools/@aws-cdk/integration-test-deployment/README.md
+24-5Lines changed: 24 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,14 @@ A tool for running AWS CDK integration tests against changed snapshots using AWS
6
6
7
7
This tool automatically detects changed integration test snapshots in the CDK repository and runs them against real AWS environments managed by Atmosphere. It ensures that CDK changes don't break existing functionality by testing them in isolated AWS accounts.
8
8
9
-
This tool is used by the [Integration Test Deployment workflow](../../../.github/workflows/codebuild-pr-deployment-integ.yml).
9
+
This tool is used by two workflows:
10
+
-[Integration Test Deployment](../../../.github/workflows/integration-test-deployment.yml) - Label-triggered with manual approval
11
+
-[Integration Test Deployment (Auto)](../../../.github/workflows/integration-test-deployment-auto.yml) - Auto-triggered on CDK team approval (shadow mode)
10
12
11
13
## Features
12
14
13
15
-**Automatic Change Detection**: Filters through the changed files to detect the integration tests
16
+
-**Preflight Check**: Validates that the PR is approved by a CDK team member before running tests
14
17
-**AWS Environment Management**: Integrates with AWS Atmosphere for temporary AWS account allocation
15
18
-**Isolated Testing**: Each test run gets its own AWS environment with proper credentials
16
19
-**Cleanup**: Automatically releases AWS resources after test completion
@@ -21,10 +24,26 @@ Authenticating to assume atmosphere role through OIDC token.
21
24
22
25
## Environment Variables
23
26
24
-
| Variable | Description
25
-
|----------|-------------
26
-
| `CDK_ATMOSPHERE_ENDPOINT` | AWS Atmosphere service endpoint
27
-
| `CDK_ATMOSPHERE_POOL` | AWS account pool name for allocation
27
+
| Variable | Description |
28
+
|----------|-------------|
29
+
|`CDK_ATMOSPHERE_ENDPOINT`| AWS Atmosphere service endpoint |
30
+
|`CDK_ATMOSPHERE_POOL`| AWS account pool name for allocation |
31
+
|`CDK_ATMOSPHERE_OIDC_ROLE`| IAM role ARN for OIDC authentication |
32
+
|`CDK_ATMOSPHERE_BATCH_SIZE`| (Optional) Number of tests to run in parallel |
33
+
|`TARGET_BRANCH_COMMIT`| Base branch commit SHA for diff |
34
+
|`SOURCE_BRANCH_COMMIT`| PR head commit SHA for diff |
35
+
|`GITHUB_TOKEN`| (Optional) GitHub token for preflight check |
36
+
|`GITHUB_REPOSITORY`| (Optional) Repository in format `owner/repo`|
37
+
|`PR_NUMBER`| (Optional) Pull request number |
38
+
39
+
## Preflight Check
40
+
41
+
When GitHub context is provided (`GITHUB_TOKEN`, `GITHUB_REPOSITORY`, `PR_NUMBER`), the tool performs a preflight check before running integration tests:
42
+
43
+
1.**Snapshot Changes**: Verifies the PR contains `.snapshot` file changes
44
+
2.**Authorization**: Checks if the PR is approved by a CDK team member (`@aws/aws-cdk-team`)
45
+
46
+
If the preflight check fails, the tool exits gracefully without running tests. This prevents unnecessary test runs on PRs that haven't been reviewed by the CDK team yet.
0 commit comments