diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/.npmignore b/packages/@aws-cdk-containers/ecs-service-extensions/.npmignore index 913c96cd9ae15..722d4070cdc1f 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/.npmignore +++ b/packages/@aws-cdk-containers/ecs-service-extensions/.npmignore @@ -22,3 +22,5 @@ tsconfig.json **/cdk.out junit.xml + +test/ \ No newline at end of file diff --git a/packages/@aws-cdk-containers/ecs-service-extensions/package.json b/packages/@aws-cdk-containers/ecs-service-extensions/package.json index 31af1ded594ec..41d80ae3884a9 100644 --- a/packages/@aws-cdk-containers/ecs-service-extensions/package.json +++ b/packages/@aws-cdk-containers/ecs-service-extensions/package.json @@ -95,4 +95,4 @@ }, "maturity": "experimental", "stability": "experimental" -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/alexa-ask/.npmignore b/packages/@aws-cdk/alexa-ask/.npmignore index ab90672b1d91e..207e92300ba4a 100644 --- a/packages/@aws-cdk/alexa-ask/.npmignore +++ b/packages/@aws-cdk/alexa-ask/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/app-delivery/.npmignore b/packages/@aws-cdk/app-delivery/.npmignore index 82e007c2c1c49..d04129afefc48 100644 --- a/packages/@aws-cdk/app-delivery/.npmignore +++ b/packages/@aws-cdk/app-delivery/.npmignore @@ -20,4 +20,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/assert/.npmignore b/packages/@aws-cdk/assert/.npmignore index 582a6ea324723..6f149ce45fddd 100644 --- a/packages/@aws-cdk/assert/.npmignore +++ b/packages/@aws-cdk/assert/.npmignore @@ -18,4 +18,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/assets/.npmignore b/packages/@aws-cdk/assets/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/assets/.npmignore +++ b/packages/@aws-cdk/assets/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-accessanalyzer/.npmignore b/packages/@aws-cdk/aws-accessanalyzer/.npmignore index a7c5b49852b3b..c2827f80c26db 100644 --- a/packages/@aws-cdk/aws-accessanalyzer/.npmignore +++ b/packages/@aws-cdk/aws-accessanalyzer/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-acmpca/.npmignore b/packages/@aws-cdk/aws-acmpca/.npmignore index c8874799485a3..5bd978c36b820 100644 --- a/packages/@aws-cdk/aws-acmpca/.npmignore +++ b/packages/@aws-cdk/aws-acmpca/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-amazonmq/.npmignore b/packages/@aws-cdk/aws-amazonmq/.npmignore index 3dffd1ce79a72..2892fc6e99416 100644 --- a/packages/@aws-cdk/aws-amazonmq/.npmignore +++ b/packages/@aws-cdk/aws-amazonmq/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-amplify/.npmignore b/packages/@aws-cdk/aws-amplify/.npmignore index 917201c845418..f3eaded585e2d 100644 --- a/packages/@aws-cdk/aws-amplify/.npmignore +++ b/packages/@aws-cdk/aws-amplify/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigateway/.npmignore b/packages/@aws-cdk/aws-apigateway/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-apigateway/.npmignore +++ b/packages/@aws-cdk/aws-apigateway/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-apigatewayv2/.npmignore b/packages/@aws-cdk/aws-apigatewayv2/.npmignore index e9418d013ad1f..093c734b1bd2f 100644 --- a/packages/@aws-cdk/aws-apigatewayv2/.npmignore +++ b/packages/@aws-cdk/aws-apigatewayv2/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appconfig/.npmignore b/packages/@aws-cdk/aws-appconfig/.npmignore index c8874799485a3..5bd978c36b820 100644 --- a/packages/@aws-cdk/aws-appconfig/.npmignore +++ b/packages/@aws-cdk/aws-appconfig/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appflow/.npmignore b/packages/@aws-cdk/aws-appflow/.npmignore index c8874799485a3..5bd978c36b820 100644 --- a/packages/@aws-cdk/aws-appflow/.npmignore +++ b/packages/@aws-cdk/aws-appflow/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-applicationautoscaling/.npmignore b/packages/@aws-cdk/aws-applicationautoscaling/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-applicationautoscaling/.npmignore +++ b/packages/@aws-cdk/aws-applicationautoscaling/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-applicationinsights/.npmignore b/packages/@aws-cdk/aws-applicationinsights/.npmignore index 7633957caec65..9c086d15db4aa 100644 --- a/packages/@aws-cdk/aws-applicationinsights/.npmignore +++ b/packages/@aws-cdk/aws-applicationinsights/.npmignore @@ -25,3 +25,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml + +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appmesh/.npmignore b/packages/@aws-cdk/aws-appmesh/.npmignore index f937500da09a6..305e5b0db6ec1 100644 --- a/packages/@aws-cdk/aws-appmesh/.npmignore +++ b/packages/@aws-cdk/aws-appmesh/.npmignore @@ -25,4 +25,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appstream/.npmignore b/packages/@aws-cdk/aws-appstream/.npmignore index ab90672b1d91e..207e92300ba4a 100644 --- a/packages/@aws-cdk/aws-appstream/.npmignore +++ b/packages/@aws-cdk/aws-appstream/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/.npmignore b/packages/@aws-cdk/aws-appsync/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-appsync/.npmignore +++ b/packages/@aws-cdk/aws-appsync/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-athena/.npmignore b/packages/@aws-cdk/aws-athena/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-athena/.npmignore +++ b/packages/@aws-cdk/aws-athena/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-autoscaling-common/.npmignore b/packages/@aws-cdk/aws-autoscaling-common/.npmignore index b0d6aa6c90bf1..500c9f6884d44 100644 --- a/packages/@aws-cdk/aws-autoscaling-common/.npmignore +++ b/packages/@aws-cdk/aws-autoscaling-common/.npmignore @@ -25,4 +25,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-autoscaling-hooktargets/.npmignore b/packages/@aws-cdk/aws-autoscaling-hooktargets/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-autoscaling-hooktargets/.npmignore +++ b/packages/@aws-cdk/aws-autoscaling-hooktargets/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-autoscaling/.npmignore b/packages/@aws-cdk/aws-autoscaling/.npmignore index 5d8f93d8a9c7e..6b3aee5fcab7c 100644 --- a/packages/@aws-cdk/aws-autoscaling/.npmignore +++ b/packages/@aws-cdk/aws-autoscaling/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out jest.config.js -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-autoscalingplans/.npmignore b/packages/@aws-cdk/aws-autoscalingplans/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-autoscalingplans/.npmignore +++ b/packages/@aws-cdk/aws-autoscalingplans/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-backup/.npmignore b/packages/@aws-cdk/aws-backup/.npmignore index 5c003cc4e3040..de98f3be1b6f4 100644 --- a/packages/@aws-cdk/aws-backup/.npmignore +++ b/packages/@aws-cdk/aws-backup/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-batch/.npmignore b/packages/@aws-cdk/aws-batch/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-batch/.npmignore +++ b/packages/@aws-cdk/aws-batch/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-budgets/.npmignore b/packages/@aws-cdk/aws-budgets/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-budgets/.npmignore +++ b/packages/@aws-cdk/aws-budgets/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cassandra/.npmignore b/packages/@aws-cdk/aws-cassandra/.npmignore index c8874799485a3..5bd978c36b820 100644 --- a/packages/@aws-cdk/aws-cassandra/.npmignore +++ b/packages/@aws-cdk/aws-cassandra/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ce/.npmignore b/packages/@aws-cdk/aws-ce/.npmignore index c8874799485a3..5bd978c36b820 100644 --- a/packages/@aws-cdk/aws-ce/.npmignore +++ b/packages/@aws-cdk/aws-ce/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-certificatemanager/.npmignore b/packages/@aws-cdk/aws-certificatemanager/.npmignore index 0a336369a6bfb..8ace99e984f5a 100644 --- a/packages/@aws-cdk/aws-certificatemanager/.npmignore +++ b/packages/@aws-cdk/aws-certificatemanager/.npmignore @@ -27,3 +27,5 @@ tsconfig.json **/cdk.out junit.xml jest.config.js + +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-chatbot/.npmignore b/packages/@aws-cdk/aws-chatbot/.npmignore index c8874799485a3..5bd978c36b820 100644 --- a/packages/@aws-cdk/aws-chatbot/.npmignore +++ b/packages/@aws-cdk/aws-chatbot/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloud9/.npmignore b/packages/@aws-cdk/aws-cloud9/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-cloud9/.npmignore +++ b/packages/@aws-cdk/aws-cloud9/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudformation/.npmignore b/packages/@aws-cdk/aws-cloudformation/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-cloudformation/.npmignore +++ b/packages/@aws-cdk/aws-cloudformation/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront-origins/.npmignore b/packages/@aws-cdk/aws-cloudfront-origins/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-cloudfront-origins/.npmignore +++ b/packages/@aws-cdk/aws-cloudfront-origins/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudfront/.npmignore b/packages/@aws-cdk/aws-cloudfront/.npmignore index cccec9064cc31..fccf7d5aa28df 100644 --- a/packages/@aws-cdk/aws-cloudfront/.npmignore +++ b/packages/@aws-cdk/aws-cloudfront/.npmignore @@ -25,4 +25,5 @@ tsconfig.json **/cdk.out jest.config.js -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudtrail/.npmignore b/packages/@aws-cdk/aws-cloudtrail/.npmignore index 34633f72bca87..f507135a52f29 100644 --- a/packages/@aws-cdk/aws-cloudtrail/.npmignore +++ b/packages/@aws-cdk/aws-cloudtrail/.npmignore @@ -23,4 +23,5 @@ tsconfig.json jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudwatch-actions/.npmignore b/packages/@aws-cdk/aws-cloudwatch-actions/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-cloudwatch-actions/.npmignore +++ b/packages/@aws-cdk/aws-cloudwatch-actions/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloudwatch/.npmignore b/packages/@aws-cdk/aws-cloudwatch/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-cloudwatch/.npmignore +++ b/packages/@aws-cdk/aws-cloudwatch/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codebuild/.npmignore b/packages/@aws-cdk/aws-codebuild/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-codebuild/.npmignore +++ b/packages/@aws-cdk/aws-codebuild/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codecommit/.npmignore b/packages/@aws-cdk/aws-codecommit/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-codecommit/.npmignore +++ b/packages/@aws-cdk/aws-codecommit/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codedeploy/.npmignore b/packages/@aws-cdk/aws-codedeploy/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-codedeploy/.npmignore +++ b/packages/@aws-cdk/aws-codedeploy/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codeguruprofiler/.npmignore b/packages/@aws-cdk/aws-codeguruprofiler/.npmignore index c8874799485a3..5bd978c36b820 100644 --- a/packages/@aws-cdk/aws-codeguruprofiler/.npmignore +++ b/packages/@aws-cdk/aws-codeguruprofiler/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codegurureviewer/.npmignore b/packages/@aws-cdk/aws-codegurureviewer/.npmignore index 72b7fcab0a22a..7b8fb69082a0f 100644 --- a/packages/@aws-cdk/aws-codegurureviewer/.npmignore +++ b/packages/@aws-cdk/aws-codegurureviewer/.npmignore @@ -24,3 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml + +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline-actions/.npmignore b/packages/@aws-cdk/aws-codepipeline-actions/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-codepipeline-actions/.npmignore +++ b/packages/@aws-cdk/aws-codepipeline-actions/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codepipeline/.npmignore b/packages/@aws-cdk/aws-codepipeline/.npmignore index b70bd617fba2d..1b4217fb1a9f0 100644 --- a/packages/@aws-cdk/aws-codepipeline/.npmignore +++ b/packages/@aws-cdk/aws-codepipeline/.npmignore @@ -24,3 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml + +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codestar/.npmignore b/packages/@aws-cdk/aws-codestar/.npmignore index 5c003cc4e3040..de98f3be1b6f4 100644 --- a/packages/@aws-cdk/aws-codestar/.npmignore +++ b/packages/@aws-cdk/aws-codestar/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codestarconnections/.npmignore b/packages/@aws-cdk/aws-codestarconnections/.npmignore index c8874799485a3..5bd978c36b820 100644 --- a/packages/@aws-cdk/aws-codestarconnections/.npmignore +++ b/packages/@aws-cdk/aws-codestarconnections/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-codestarnotifications/.npmignore b/packages/@aws-cdk/aws-codestarnotifications/.npmignore index a7c5b49852b3b..c2827f80c26db 100644 --- a/packages/@aws-cdk/aws-codestarnotifications/.npmignore +++ b/packages/@aws-cdk/aws-codestarnotifications/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cognito/.npmignore b/packages/@aws-cdk/aws-cognito/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-cognito/.npmignore +++ b/packages/@aws-cdk/aws-cognito/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-config/.npmignore b/packages/@aws-cdk/aws-config/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-config/.npmignore +++ b/packages/@aws-cdk/aws-config/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-datapipeline/.npmignore b/packages/@aws-cdk/aws-datapipeline/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-datapipeline/.npmignore +++ b/packages/@aws-cdk/aws-datapipeline/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-dax/.npmignore b/packages/@aws-cdk/aws-dax/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-dax/.npmignore +++ b/packages/@aws-cdk/aws-dax/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-detective/.npmignore b/packages/@aws-cdk/aws-detective/.npmignore index c8874799485a3..5bd978c36b820 100644 --- a/packages/@aws-cdk/aws-detective/.npmignore +++ b/packages/@aws-cdk/aws-detective/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-directoryservice/.npmignore b/packages/@aws-cdk/aws-directoryservice/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-directoryservice/.npmignore +++ b/packages/@aws-cdk/aws-directoryservice/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-dlm/.npmignore b/packages/@aws-cdk/aws-dlm/.npmignore index ab90672b1d91e..207e92300ba4a 100644 --- a/packages/@aws-cdk/aws-dlm/.npmignore +++ b/packages/@aws-cdk/aws-dlm/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-dms/.npmignore b/packages/@aws-cdk/aws-dms/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-dms/.npmignore +++ b/packages/@aws-cdk/aws-dms/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-docdb/.npmignore b/packages/@aws-cdk/aws-docdb/.npmignore index ab90672b1d91e..207e92300ba4a 100644 --- a/packages/@aws-cdk/aws-docdb/.npmignore +++ b/packages/@aws-cdk/aws-docdb/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-dynamodb-global/.npmignore b/packages/@aws-cdk/aws-dynamodb-global/.npmignore index e418511182841..ecc7155058048 100644 --- a/packages/@aws-cdk/aws-dynamodb-global/.npmignore +++ b/packages/@aws-cdk/aws-dynamodb-global/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-dynamodb/.npmignore b/packages/@aws-cdk/aws-dynamodb/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-dynamodb/.npmignore +++ b/packages/@aws-cdk/aws-dynamodb/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/.npmignore b/packages/@aws-cdk/aws-ec2/.npmignore index 5d8f93d8a9c7e..6b3aee5fcab7c 100644 --- a/packages/@aws-cdk/aws-ec2/.npmignore +++ b/packages/@aws-cdk/aws-ec2/.npmignore @@ -23,4 +23,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out jest.config.js -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecr-assets/.npmignore b/packages/@aws-cdk/aws-ecr-assets/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-ecr-assets/.npmignore +++ b/packages/@aws-cdk/aws-ecr-assets/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecr/.npmignore b/packages/@aws-cdk/aws-ecr/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-ecr/.npmignore +++ b/packages/@aws-cdk/aws-ecr/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs-patterns/.npmignore b/packages/@aws-cdk/aws-ecs-patterns/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/.npmignore +++ b/packages/@aws-cdk/aws-ecs-patterns/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ecs/.npmignore b/packages/@aws-cdk/aws-ecs/.npmignore index d683303ca5c16..40fbede1f02dc 100644 --- a/packages/@aws-cdk/aws-ecs/.npmignore +++ b/packages/@aws-cdk/aws-ecs/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-efs/.npmignore b/packages/@aws-cdk/aws-efs/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-efs/.npmignore +++ b/packages/@aws-cdk/aws-efs/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks-legacy/.npmignore b/packages/@aws-cdk/aws-eks-legacy/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-eks-legacy/.npmignore +++ b/packages/@aws-cdk/aws-eks-legacy/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks/.npmignore b/packages/@aws-cdk/aws-eks/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-eks/.npmignore +++ b/packages/@aws-cdk/aws-eks/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eks/README.md b/packages/@aws-cdk/aws-eks/README.md index a49a11aab2624..a04432a038be9 100644 --- a/packages/@aws-cdk/aws-eks/README.md +++ b/packages/@aws-cdk/aws-eks/README.md @@ -36,6 +36,7 @@ Table Of Contents * [Applying Kubernetes Resources](#applying-kubernetes-resources) * [Kubernetes Manifests](#kubernetes-manifests) * [Helm Charts](#helm-charts) + * [CDK8s Charts](#cdk8s-charts) * [Patching Kuberentes Resources](#patching-kubernetes-resources) * [Querying Kubernetes Resources](#querying-kubernetes-resources) * [Using existing clusters](#using-existing-clusters) @@ -811,6 +812,127 @@ const chart2 = cluster.addHelmChart(...); chart2.node.addDependency(chart1); ``` +#### CDK8s Charts + +[CDK8s](https://cdk8s.io/) is an open-source library that enables Kubernetes manifest authoring using familiar programming languages. It is founded on the same technologies as the AWS CDK, such as [`constructs`](https://github.com/aws/constructs) and [`jsii`](https://github.com/aws/jsii). + +> To learn more about cdk8s, visit the [Getting Started](https://github.com/awslabs/cdk8s/tree/master/docs/getting-started) tutorials. + +The EKS module natively integrates with cdk8s and allows you to apply cdk8s charts on AWS EKS clusters via the `cluster.addCdk8sChart` method. + +In addition to `cdk8s`, you can also use [`cdk8s+`](https://github.com/awslabs/cdk8s/tree/master/packages/cdk8s-plus), which provides higher level abstraction for the core kubernetes api objects. +You can think of it like the `L2` constructs for Kubernetes. Any other `cdk8s` based libraries are also supported, for example [`cdk8s-debore`](https://github.com/toricls/cdk8s-debore). + +To get started, add the following dependencies to your `package.json` file: + +```json +"dependencies": { + "cdk8s": "0.30.0", + "cdk8s-plus": "0.30.0", + "constructs": "3.0.4" +} +``` + +> Note that the version of `cdk8s` must be `>=0.30.0`. + +Similarly to how you would create a stack by extending `@aws-cdk/core.Stack`, we recommend you create a chart of your own that extends `cdk8s.Chart`, +and add your kubernetes resources to it. You can use `aws-cdk` construct attributes and properties inside your `cdk8s` construct freely. + +In this example we create a chart that accepts an `s3.Bucket` and passes its name to a kubernetes pod as an environment variable. + +Notice that the chart must accept a `constructs.Construct` type as its scope, not an `@aws-cdk/core.Construct` as you would normally use. +For this reason, to avoid possible confusion, we will create the chart in a separate file: + +`+ my-chart.ts` +```ts +import * as s3 from '@aws-cdk/aws-s3'; +import * as constructs from 'constructs'; +import * as cdk8s from 'cdk8s'; +import * as kplus from 'cdk8s-plus'; + +export interface MyChartProps { + readonly bucket: s3.Bucket; +} + +export class MyChart extends cdk8s.Chart { + constructor(scope: constructs.Construct, id: string, props: MyChartProps} ) { + super(scope, id); + + new kplus.Pod(this, 'Pod', { + spec: { + containers: [ + new kplus.Container({ + image: 'my-image', + env: { + BUCKET_NAME: bucket.bucketName, + } + }) + ] + } + }); + } +} +``` + +Then, in your AWS CDK app: + +```ts +import * as s3 from '@aws-cdk/aws-s3'; +import * as cdk8s from 'cdk8s'; +import { MyChart } from './my-chart'; + +// some bucket.. +const bucket = new s3.Bucket(this, 'Bucket'); + +// create a cdk8s chart and use `cdk8s.App` as the scope. +const myChart = new MyChart(new cdk8s.App(), 'MyChart', { bucket }); + +// add the cdk8s chart to the cluster +cluster.addCdk8sChart('my-chart', myChart); +``` + +##### Custom CDK8s Constructs + +You can also compose a few stock `cdk8s+` constructs into your own custom construct. However, since mixing scopes between `aws-cdk` and `cdk8s` is currently not supported, the `Construct` class +you'll need to use is the one from the [`constructs`](https://github.com/aws/constructs) module, and not from `@aws-cdk/core` like you normally would. +This is why we used `new cdk8s.App()` as the scope of the chart above. + +```ts +import * as constructs from 'constructs'; +import * as cdk8s from 'cdk8s'; +import * as kplus from 'cdk8s-plus'; + +export interface LoadBalancedWebService { + readonly port: number; + readonly image: string; + readonly replicas: number; +} + +export class LoadBalancedWebService extends constructs.Construct { + constructor(scope: constructs.Construct, id: string, props: LoadBalancedWebService) { + super(scope, id); + + const deployment = new kplus.Deployment(chart, 'Deployment', { + spec: { + replicas: props.replicas, + podSpecTemplate: { + containers: [ new kplus.Container({ image: props.image }) ] + } + }, + }); + + deployment.expose({port: props.port, serviceType: kplus.ServiceType.LOAD_BALANCER}) + + } +} +``` + +##### Manually importing k8s specs and CRD's + +If you find yourself unable to use `cdk8s+`, or just like to directly use the `k8s` native objects or CRD's, you can do so by manually importing them using the `cdk8s-cli`. + +See [Importing kubernetes objects](https://github.com/awslabs/cdk8s/tree/master/packages/cdk8s-cli#import) for detailed instructions. + ## Patching Kubernetes Resources The `KubernetesPatch` construct can be used to update existing kubernetes diff --git a/packages/@aws-cdk/aws-eks/lib/cluster.ts b/packages/@aws-cdk/aws-eks/lib/cluster.ts index cf1b74743a1f9..ae9e1dbdc6dc1 100644 --- a/packages/@aws-cdk/aws-eks/lib/cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/cluster.ts @@ -7,6 +7,7 @@ import * as kms from '@aws-cdk/aws-kms'; import * as lambda from '@aws-cdk/aws-lambda'; import * as ssm from '@aws-cdk/aws-ssm'; import { Annotations, CfnOutput, CfnResource, IResource, Resource, Stack, Tags, Token, Duration } from '@aws-cdk/core'; +import * as cdk8s from 'cdk8s'; import { Construct, Node } from 'constructs'; import * as YAML from 'yaml'; import { AwsAuth } from './aws-auth'; @@ -132,6 +133,16 @@ export interface ICluster extends IResource, ec2.IConnectable { * @returns a `HelmChart` construct */ addHelmChart(id: string, options: HelmChartOptions): HelmChart; + + /** + * Defines a CDK8s chart in this cluster. + * + * @param id logical id of this chart. + * @param chart the cdk8s chart. + * @returns a `KubernetesManifest` construct representing the chart. + */ + addCdk8sChart(id: string, chart: cdk8s.Chart): KubernetesManifest; + } /** @@ -617,6 +628,17 @@ abstract class ClusterBase extends Resource implements ICluster { public addHelmChart(id: string, options: HelmChartOptions): HelmChart { return new HelmChart(this, `chart-${id}`, { cluster: this, ...options }); } + + /** + * Defines a CDK8s chart in this cluster. + * + * @param id logical id of this chart. + * @param chart the cdk8s chart. + * @returns a `KubernetesManifest` construct representing the chart. + */ + public addCdk8sChart(id: string, chart: cdk8s.Chart): KubernetesManifest { + return this.addManifest(id, ...chart.toJson()); + } } /** diff --git a/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts b/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts index 148e65166e1da..c862f7fd3d0f6 100644 --- a/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts +++ b/packages/@aws-cdk/aws-eks/lib/legacy-cluster.ts @@ -3,6 +3,7 @@ import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; import * as ssm from '@aws-cdk/aws-ssm'; +import * as cdk8s from 'cdk8s'; import { Annotations, CfnOutput, Resource, Stack, Token, Tags } from '@aws-cdk/core'; import { Construct } from 'constructs'; import { ICluster, ClusterAttributes, KubernetesVersion, NodeType, DefaultCapacityType, EksOptimizedImage, AutoScalingGroupCapacityOptions, MachineImageType, AutoScalingGroupOptions, CommonClusterOptions } from './cluster'; @@ -371,6 +372,10 @@ export class LegacyCluster extends Resource implements ICluster { throw new Error('legacy cluster does not support adding helm charts'); } + public addCdk8sChart(_id: string, _chart: cdk8s.Chart): KubernetesManifest { + throw new Error('legacy cluster does not support adding cdk8s charts'); + } + /** * Opportunistically tag subnets with the required tags. * @@ -429,6 +434,10 @@ class ImportedCluster extends Resource implements ICluster { throw new Error('legacy cluster does not support adding helm charts'); } + public addCdk8sChart(_id: string, _chart: cdk8s.Chart): KubernetesManifest { + throw new Error('legacy cluster does not support adding cdk8s charts'); + } + public get vpc() { if (!this.props.vpc) { throw new Error('"vpc" is not defined for this imported cluster'); diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index 7aa6b16bdd7d4..dcf8ee02c9955 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -79,7 +79,8 @@ "cfn2ts": "0.0.0", "nodeunit": "^0.11.3", "pkglint": "0.0.0", - "sinon": "^9.1.0" + "sinon": "^9.1.0", + "cdk8s-plus": "^0.29.0" }, "dependencies": { "@aws-cdk/aws-autoscaling": "0.0.0", @@ -90,6 +91,7 @@ "@aws-cdk/aws-ssm": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/custom-resources": "0.0.0", + "cdk8s": "^0.30.0", "constructs": "^3.0.4", "yaml": "1.10.0" }, @@ -106,6 +108,7 @@ "@aws-cdk/aws-ssm": "0.0.0", "@aws-cdk/core": "0.0.0", "@aws-cdk/custom-resources": "0.0.0", + "cdk8s": "^0.30.0", "constructs": "^3.0.4" }, "engines": { diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json index b015b80826d45..6f5bb70ec88c7 100644 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json +++ b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.expected.json @@ -3342,11 +3342,6 @@ } ], "ForceUpdateEnabled": true, - "ScalingConfig": { - "DesiredSize": 1, - "MaxSize": 1, - "MinSize": 1 - }, "LaunchTemplate": { "Id": { "Ref": "LaunchTemplate" @@ -3357,6 +3352,11 @@ "DefaultVersionNumber" ] } + }, + "ScalingConfig": { + "DesiredSize": 1, + "MaxSize": 1, + "MinSize": 1 } } }, @@ -3416,6 +3416,43 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, + "Clustermanifestcdk8schart6B444884": { + "Type": "Custom::AWSCDK-EKS-KubernetesResource", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "awscdkawseksKubectlProviderNestedStackawscdkawseksKubectlProviderNestedStackResourceA7AEBA6B", + "Outputs.awscdkeksclustertestawscdkawseksKubectlProviderframeworkonEventC681B49AArn" + ] + }, + "Manifest": { + "Fn::Join": [ + "", + [ + "[{\"apiVersion\":\"v1\",\"data\":{\"clusterName\":\"", + { + "Ref": "Cluster9EE0221C" + }, + "\"},\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"chart-config-map-configmap-cccf3117\"}}]" + ] + ] + }, + "ClusterName": { + "Ref": "Cluster9EE0221C" + }, + "RoleArn": { + "Fn::GetAtt": [ + "ClusterCreationRole360249B6", + "Arn" + ] + } + }, + "DependsOn": [ + "ClusterKubectlReadyBarrier200052AF" + ], + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, "ClustermanifestnginxnamespaceA68B4CE0": { "Type": "Custom::AWSCDK-EKS-KubernetesResource", "Properties": { @@ -3710,7 +3747,7 @@ }, "/", { - "Ref": "AssetParameters04fa2d485a51abd8261468eb6fa053d3a72242fc068fa75683232a52960b30cfS3Bucket0E3AAAB9" + "Ref": "AssetParametersa69aadbed84d554dd9f2eb7987ffe5d8f76b53a86f1909059df07050e57bef0cS3Bucket1CB7A187" }, "/", { @@ -3720,7 +3757,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters04fa2d485a51abd8261468eb6fa053d3a72242fc068fa75683232a52960b30cfS3VersionKey8C90C4EF" + "Ref": "AssetParametersa69aadbed84d554dd9f2eb7987ffe5d8f76b53a86f1909059df07050e57bef0cS3VersionKey7C13F243" } ] } @@ -3733,7 +3770,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters04fa2d485a51abd8261468eb6fa053d3a72242fc068fa75683232a52960b30cfS3VersionKey8C90C4EF" + "Ref": "AssetParametersa69aadbed84d554dd9f2eb7987ffe5d8f76b53a86f1909059df07050e57bef0cS3VersionKey7C13F243" } ] } @@ -3749,17 +3786,17 @@ "Arn" ] }, - "referencetoawscdkeksclustertestAssetParameters7997347617940455774a736af2df2e6238c13b755ad25353a3d081446cfc80a4S3BucketAAB1A713Ref": { - "Ref": "AssetParameters7997347617940455774a736af2df2e6238c13b755ad25353a3d081446cfc80a4S3Bucket086F94BB" + "referencetoawscdkeksclustertestAssetParameters87b1e2c41f84590d14f7ab8cb0f338c51d6fa3efe78943867af07fa959593dbaS3Bucket1516DB0ARef": { + "Ref": "AssetParameters87b1e2c41f84590d14f7ab8cb0f338c51d6fa3efe78943867af07fa959593dbaS3Bucket14D204F9" }, - "referencetoawscdkeksclustertestAssetParameters7997347617940455774a736af2df2e6238c13b755ad25353a3d081446cfc80a4S3VersionKey481F0807Ref": { - "Ref": "AssetParameters7997347617940455774a736af2df2e6238c13b755ad25353a3d081446cfc80a4S3VersionKeyA4B5C598" + "referencetoawscdkeksclustertestAssetParameters87b1e2c41f84590d14f7ab8cb0f338c51d6fa3efe78943867af07fa959593dbaS3VersionKey2B8F3ED3Ref": { + "Ref": "AssetParameters87b1e2c41f84590d14f7ab8cb0f338c51d6fa3efe78943867af07fa959593dbaS3VersionKeyDE8A2F1F" }, - "referencetoawscdkeksclustertestAssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3Bucket85526CA7Ref": { - "Ref": "AssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3BucketD25BCC90" + "referencetoawscdkeksclustertestAssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1S3Bucket0815E7B5Ref": { + "Ref": "AssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1S3BucketDC4B98B1" }, - "referencetoawscdkeksclustertestAssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3VersionKey46BA60C1Ref": { - "Ref": "AssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3VersionKey72DFE7A5" + "referencetoawscdkeksclustertestAssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1S3VersionKey657736ADRef": { + "Ref": "AssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1S3VersionKeyA495226F" } } } @@ -3777,7 +3814,7 @@ }, "/", { - "Ref": "AssetParameters215e9f40bd76e7102c690b24b0922eb4963d2d24938eec175e107db683455d11S3BucketC456B560" + "Ref": "AssetParameters8a716921b900641df041bd35d4d1817780375a004ec952e2cab0cd621c5a4d64S3BucketAA0CCE0D" }, "/", { @@ -3787,7 +3824,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters215e9f40bd76e7102c690b24b0922eb4963d2d24938eec175e107db683455d11S3VersionKeyA1DAD649" + "Ref": "AssetParameters8a716921b900641df041bd35d4d1817780375a004ec952e2cab0cd621c5a4d64S3VersionKey3012C8DD" } ] } @@ -3800,7 +3837,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters215e9f40bd76e7102c690b24b0922eb4963d2d24938eec175e107db683455d11S3VersionKeyA1DAD649" + "Ref": "AssetParameters8a716921b900641df041bd35d4d1817780375a004ec952e2cab0cd621c5a4d64S3VersionKey3012C8DD" } ] } @@ -3843,11 +3880,11 @@ "ClusterSecurityGroupId" ] }, - "referencetoawscdkeksclustertestAssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3Bucket85526CA7Ref": { - "Ref": "AssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3BucketD25BCC90" + "referencetoawscdkeksclustertestAssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1S3Bucket0815E7B5Ref": { + "Ref": "AssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1S3BucketDC4B98B1" }, - "referencetoawscdkeksclustertestAssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3VersionKey46BA60C1Ref": { - "Ref": "AssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3VersionKey72DFE7A5" + "referencetoawscdkeksclustertestAssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1S3VersionKey657736ADRef": { + "Ref": "AssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1S3VersionKeyA495226F" } } } @@ -4271,7 +4308,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3BucketD25BCC90" + "Ref": "AssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1S3BucketDC4B98B1" }, "S3Key": { "Fn::Join": [ @@ -4284,7 +4321,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3VersionKey72DFE7A5" + "Ref": "AssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1S3VersionKeyA495226F" } ] } @@ -4297,7 +4334,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3VersionKey72DFE7A5" + "Ref": "AssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1S3VersionKeyA495226F" } ] } @@ -4458,29 +4495,29 @@ } }, "Parameters": { - "AssetParameters7997347617940455774a736af2df2e6238c13b755ad25353a3d081446cfc80a4S3Bucket086F94BB": { + "AssetParameters87b1e2c41f84590d14f7ab8cb0f338c51d6fa3efe78943867af07fa959593dbaS3Bucket14D204F9": { "Type": "String", - "Description": "S3 bucket for asset \"7997347617940455774a736af2df2e6238c13b755ad25353a3d081446cfc80a4\"" + "Description": "S3 bucket for asset \"87b1e2c41f84590d14f7ab8cb0f338c51d6fa3efe78943867af07fa959593dba\"" }, - "AssetParameters7997347617940455774a736af2df2e6238c13b755ad25353a3d081446cfc80a4S3VersionKeyA4B5C598": { + "AssetParameters87b1e2c41f84590d14f7ab8cb0f338c51d6fa3efe78943867af07fa959593dbaS3VersionKeyDE8A2F1F": { "Type": "String", - "Description": "S3 key for asset version \"7997347617940455774a736af2df2e6238c13b755ad25353a3d081446cfc80a4\"" + "Description": "S3 key for asset version \"87b1e2c41f84590d14f7ab8cb0f338c51d6fa3efe78943867af07fa959593dba\"" }, - "AssetParameters7997347617940455774a736af2df2e6238c13b755ad25353a3d081446cfc80a4ArtifactHash9B26D532": { + "AssetParameters87b1e2c41f84590d14f7ab8cb0f338c51d6fa3efe78943867af07fa959593dbaArtifactHash54822A43": { "Type": "String", - "Description": "Artifact hash for asset \"7997347617940455774a736af2df2e6238c13b755ad25353a3d081446cfc80a4\"" + "Description": "Artifact hash for asset \"87b1e2c41f84590d14f7ab8cb0f338c51d6fa3efe78943867af07fa959593dba\"" }, - "AssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3BucketD25BCC90": { + "AssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1S3BucketDC4B98B1": { "Type": "String", - "Description": "S3 bucket for asset \"34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1\"" + "Description": "S3 bucket for asset \"daeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1\"" }, - "AssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1S3VersionKey72DFE7A5": { + "AssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1S3VersionKeyA495226F": { "Type": "String", - "Description": "S3 key for asset version \"34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1\"" + "Description": "S3 key for asset version \"daeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1\"" }, - "AssetParameters34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1ArtifactHashAA0236EE": { + "AssetParametersdaeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1ArtifactHashA521A16F": { "Type": "String", - "Description": "Artifact hash for asset \"34131c2e554ab57ad3a47fc0a13173a5c2a4b65a7582fe9622277b3d04c8e1e1\"" + "Description": "Artifact hash for asset \"daeb79e3cee39c9b902dc0d5c780223e227ed573ea60976252947adab5fb2be1\"" }, "AssetParametersb7d8a9750f8bfded8ac76be100e3bee1c3d4824df006766110d023f42952f5c2S3Bucket9ABBD5A2": { "Type": "String", @@ -4530,29 +4567,29 @@ "Type": "String", "Description": "Artifact hash for asset \"2acc31b34c05692ab3ea9831a27e5f241cffb21857e633d8256b8f0ebf5f3f43\"" }, - "AssetParameters04fa2d485a51abd8261468eb6fa053d3a72242fc068fa75683232a52960b30cfS3Bucket0E3AAAB9": { + "AssetParametersa69aadbed84d554dd9f2eb7987ffe5d8f76b53a86f1909059df07050e57bef0cS3Bucket1CB7A187": { "Type": "String", - "Description": "S3 bucket for asset \"04fa2d485a51abd8261468eb6fa053d3a72242fc068fa75683232a52960b30cf\"" + "Description": "S3 bucket for asset \"a69aadbed84d554dd9f2eb7987ffe5d8f76b53a86f1909059df07050e57bef0c\"" }, - "AssetParameters04fa2d485a51abd8261468eb6fa053d3a72242fc068fa75683232a52960b30cfS3VersionKey8C90C4EF": { + "AssetParametersa69aadbed84d554dd9f2eb7987ffe5d8f76b53a86f1909059df07050e57bef0cS3VersionKey7C13F243": { "Type": "String", - "Description": "S3 key for asset version \"04fa2d485a51abd8261468eb6fa053d3a72242fc068fa75683232a52960b30cf\"" + "Description": "S3 key for asset version \"a69aadbed84d554dd9f2eb7987ffe5d8f76b53a86f1909059df07050e57bef0c\"" }, - "AssetParameters04fa2d485a51abd8261468eb6fa053d3a72242fc068fa75683232a52960b30cfArtifactHash1CDB946A": { + "AssetParametersa69aadbed84d554dd9f2eb7987ffe5d8f76b53a86f1909059df07050e57bef0cArtifactHashBADE945D": { "Type": "String", - "Description": "Artifact hash for asset \"04fa2d485a51abd8261468eb6fa053d3a72242fc068fa75683232a52960b30cf\"" + "Description": "Artifact hash for asset \"a69aadbed84d554dd9f2eb7987ffe5d8f76b53a86f1909059df07050e57bef0c\"" }, - "AssetParameters215e9f40bd76e7102c690b24b0922eb4963d2d24938eec175e107db683455d11S3BucketC456B560": { + "AssetParameters8a716921b900641df041bd35d4d1817780375a004ec952e2cab0cd621c5a4d64S3BucketAA0CCE0D": { "Type": "String", - "Description": "S3 bucket for asset \"215e9f40bd76e7102c690b24b0922eb4963d2d24938eec175e107db683455d11\"" + "Description": "S3 bucket for asset \"8a716921b900641df041bd35d4d1817780375a004ec952e2cab0cd621c5a4d64\"" }, - "AssetParameters215e9f40bd76e7102c690b24b0922eb4963d2d24938eec175e107db683455d11S3VersionKeyA1DAD649": { + "AssetParameters8a716921b900641df041bd35d4d1817780375a004ec952e2cab0cd621c5a4d64S3VersionKey3012C8DD": { "Type": "String", - "Description": "S3 key for asset version \"215e9f40bd76e7102c690b24b0922eb4963d2d24938eec175e107db683455d11\"" + "Description": "S3 key for asset version \"8a716921b900641df041bd35d4d1817780375a004ec952e2cab0cd621c5a4d64\"" }, - "AssetParameters215e9f40bd76e7102c690b24b0922eb4963d2d24938eec175e107db683455d11ArtifactHash95B6846D": { + "AssetParameters8a716921b900641df041bd35d4d1817780375a004ec952e2cab0cd621c5a4d64ArtifactHashFBD3EEB7": { "Type": "String", - "Description": "Artifact hash for asset \"215e9f40bd76e7102c690b24b0922eb4963d2d24938eec175e107db683455d11\"" + "Description": "Artifact hash for asset \"8a716921b900641df041bd35d4d1817780375a004ec952e2cab0cd621c5a4d64\"" }, "SsmParameterValueawsserviceeksoptimizedami117amazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter": { "Type": "AWS::SSM::Parameter::Value", diff --git a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.ts b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.ts index 689d6cee92068..61860df4b94c5 100644 --- a/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.ts +++ b/packages/@aws-cdk/aws-eks/test/integ.eks-cluster.ts @@ -3,6 +3,9 @@ import * as ec2 from '@aws-cdk/aws-ec2'; import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; import { App, CfnOutput, Duration, Token, Fn } from '@aws-cdk/core'; +import * as cdk8s from 'cdk8s'; +import * as kplus from 'cdk8s-plus'; +import * as constructs from 'constructs'; import * as eks from '../lib'; import * as hello from './hello-k8s'; import { Pinger } from './pinger/pinger'; @@ -58,6 +61,8 @@ class EksClusterStack extends TestStack { this.assertSimpleHelmChart(); + this.assertSimpleCdk8sChart(); + this.assertCreateNamespace(); this.assertServiceAccount(); @@ -101,6 +106,26 @@ class EksClusterStack extends TestStack { } + + private assertSimpleCdk8sChart() { + + class Chart extends cdk8s.Chart { + constructor(scope: constructs.Construct, ns: string, cluster: eks.ICluster) { + super(scope, ns); + + new kplus.ConfigMap(this, 'config-map', { + data: { + clusterName: cluster.clusterName, + }, + }); + + } + } + const app = new cdk8s.App(); + const chart = new Chart(app, 'Chart', this.cluster); + + this.cluster.addCdk8sChart('cdk8s-chart', chart); + } private assertSimpleHelmChart() { // deploy the Kubernetes dashboard through a helm chart this.cluster.addHelmChart('dashboard', { diff --git a/packages/@aws-cdk/aws-eks/test/test.cluster.ts b/packages/@aws-cdk/aws-eks/test/test.cluster.ts index afd71faa9c308..ca3ace90524d1 100644 --- a/packages/@aws-cdk/aws-eks/test/test.cluster.ts +++ b/packages/@aws-cdk/aws-eks/test/test.cluster.ts @@ -7,6 +7,7 @@ import * as iam from '@aws-cdk/aws-iam'; import * as kms from '@aws-cdk/aws-kms'; import * as lambda from '@aws-cdk/aws-lambda'; import * as cdk from '@aws-cdk/core'; +import * as cdk8s from 'cdk8s'; import * as constructs from 'constructs'; import { Test } from 'nodeunit'; import * as YAML from 'yaml'; @@ -21,6 +22,49 @@ const CLUSTER_VERSION = eks.KubernetesVersion.V1_16; export = { + 'cdk8s chart can be added to cluster'(test: Test) { + + const { stack } = testFixture(); + + const cluster = new eks.Cluster(stack, 'Cluster', { + version: eks.KubernetesVersion.V1_17, + }); + + const app = new cdk8s.App(); + const chart = new cdk8s.Chart(app, 'Chart'); + + new cdk8s.ApiObject(chart, 'FakePod', { + apiVersion: 'v1', + kind: 'Pod', + metadata: { + name: 'fake-pod', + labels: { + // adding aws-cdk token to cdk8s chart + clusterName: cluster.clusterName, + }, + }, + }); + + cluster.addCdk8sChart('cdk8s-chart', chart); + + expect(stack).to(haveResourceLike('Custom::AWSCDK-EKS-KubernetesResource', { + Manifest: { + 'Fn::Join': [ + '', + [ + '[{"apiVersion":"v1","kind":"Pod","metadata":{"labels":{"clusterName":"', + { + Ref: 'Cluster9EE0221C', + }, + '"},"name":"fake-pod"}}]', + ], + ], + }, + })); + + test.done(); + }, + 'cluster connections include both control plane and cluster security group'(test: Test) { const { stack } = testFixture(); diff --git a/packages/@aws-cdk/aws-elasticache/.npmignore b/packages/@aws-cdk/aws-elasticache/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-elasticache/.npmignore +++ b/packages/@aws-cdk/aws-elasticache/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticbeanstalk/.npmignore b/packages/@aws-cdk/aws-elasticbeanstalk/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-elasticbeanstalk/.npmignore +++ b/packages/@aws-cdk/aws-elasticbeanstalk/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancing/.npmignore b/packages/@aws-cdk/aws-elasticloadbalancing/.npmignore index 1a36d0617073e..4a398e9d7d239 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancing/.npmignore +++ b/packages/@aws-cdk/aws-elasticloadbalancing/.npmignore @@ -24,3 +24,5 @@ tsconfig.json **/cdk.out junit.xml jest.config.js + +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/.npmignore b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/.npmignore index d7886d9208116..dffe09131a636 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/.npmignore +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-actions/.npmignore @@ -22,4 +22,5 @@ tsconfig.json jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/.npmignore b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/.npmignore index a0bf754e3cc79..c28149f1ec41d 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/.npmignore +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2-targets/.npmignore @@ -22,4 +22,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticloadbalancingv2/.npmignore b/packages/@aws-cdk/aws-elasticloadbalancingv2/.npmignore index 1a36d0617073e..4a398e9d7d239 100644 --- a/packages/@aws-cdk/aws-elasticloadbalancingv2/.npmignore +++ b/packages/@aws-cdk/aws-elasticloadbalancingv2/.npmignore @@ -24,3 +24,5 @@ tsconfig.json **/cdk.out junit.xml jest.config.js + +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-elasticsearch/.npmignore b/packages/@aws-cdk/aws-elasticsearch/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-elasticsearch/.npmignore +++ b/packages/@aws-cdk/aws-elasticsearch/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-emr/.npmignore b/packages/@aws-cdk/aws-emr/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-emr/.npmignore +++ b/packages/@aws-cdk/aws-emr/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/.npmignore b/packages/@aws-cdk/aws-events-targets/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-events-targets/.npmignore +++ b/packages/@aws-cdk/aws-events-targets/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events/.npmignore b/packages/@aws-cdk/aws-events/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-events/.npmignore +++ b/packages/@aws-cdk/aws-events/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-eventschemas/.npmignore b/packages/@aws-cdk/aws-eventschemas/.npmignore index a7c5b49852b3b..c2827f80c26db 100644 --- a/packages/@aws-cdk/aws-eventschemas/.npmignore +++ b/packages/@aws-cdk/aws-eventschemas/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-fms/.npmignore b/packages/@aws-cdk/aws-fms/.npmignore index c8874799485a3..5bd978c36b820 100644 --- a/packages/@aws-cdk/aws-fms/.npmignore +++ b/packages/@aws-cdk/aws-fms/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-fsx/.npmignore b/packages/@aws-cdk/aws-fsx/.npmignore index ab90672b1d91e..207e92300ba4a 100644 --- a/packages/@aws-cdk/aws-fsx/.npmignore +++ b/packages/@aws-cdk/aws-fsx/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-gamelift/.npmignore b/packages/@aws-cdk/aws-gamelift/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-gamelift/.npmignore +++ b/packages/@aws-cdk/aws-gamelift/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-globalaccelerator/.npmignore b/packages/@aws-cdk/aws-globalaccelerator/.npmignore index c8874799485a3..5bd978c36b820 100644 --- a/packages/@aws-cdk/aws-globalaccelerator/.npmignore +++ b/packages/@aws-cdk/aws-globalaccelerator/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-glue/.npmignore b/packages/@aws-cdk/aws-glue/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-glue/.npmignore +++ b/packages/@aws-cdk/aws-glue/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-greengrass/.npmignore b/packages/@aws-cdk/aws-greengrass/.npmignore index ab90672b1d91e..207e92300ba4a 100644 --- a/packages/@aws-cdk/aws-greengrass/.npmignore +++ b/packages/@aws-cdk/aws-greengrass/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-guardduty/.npmignore b/packages/@aws-cdk/aws-guardduty/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-guardduty/.npmignore +++ b/packages/@aws-cdk/aws-guardduty/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iam/.npmignore b/packages/@aws-cdk/aws-iam/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-iam/.npmignore +++ b/packages/@aws-cdk/aws-iam/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-imagebuilder/.npmignore b/packages/@aws-cdk/aws-imagebuilder/.npmignore index c8874799485a3..5bd978c36b820 100644 --- a/packages/@aws-cdk/aws-imagebuilder/.npmignore +++ b/packages/@aws-cdk/aws-imagebuilder/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-inspector/.npmignore b/packages/@aws-cdk/aws-inspector/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-inspector/.npmignore +++ b/packages/@aws-cdk/aws-inspector/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot/.npmignore b/packages/@aws-cdk/aws-iot/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-iot/.npmignore +++ b/packages/@aws-cdk/aws-iot/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iot1click/.npmignore b/packages/@aws-cdk/aws-iot1click/.npmignore index 3dffd1ce79a72..2892fc6e99416 100644 --- a/packages/@aws-cdk/aws-iot1click/.npmignore +++ b/packages/@aws-cdk/aws-iot1click/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iotanalytics/.npmignore b/packages/@aws-cdk/aws-iotanalytics/.npmignore index ab90672b1d91e..207e92300ba4a 100644 --- a/packages/@aws-cdk/aws-iotanalytics/.npmignore +++ b/packages/@aws-cdk/aws-iotanalytics/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iotevents/.npmignore b/packages/@aws-cdk/aws-iotevents/.npmignore index 5c003cc4e3040..de98f3be1b6f4 100644 --- a/packages/@aws-cdk/aws-iotevents/.npmignore +++ b/packages/@aws-cdk/aws-iotevents/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-iotthingsgraph/.npmignore b/packages/@aws-cdk/aws-iotthingsgraph/.npmignore index 917201c845418..f3eaded585e2d 100644 --- a/packages/@aws-cdk/aws-iotthingsgraph/.npmignore +++ b/packages/@aws-cdk/aws-iotthingsgraph/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kendra/.npmignore b/packages/@aws-cdk/aws-kendra/.npmignore index 72b7fcab0a22a..7b8fb69082a0f 100644 --- a/packages/@aws-cdk/aws-kendra/.npmignore +++ b/packages/@aws-cdk/aws-kendra/.npmignore @@ -24,3 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml + +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kinesis/.npmignore b/packages/@aws-cdk/aws-kinesis/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-kinesis/.npmignore +++ b/packages/@aws-cdk/aws-kinesis/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kinesisanalytics/.npmignore b/packages/@aws-cdk/aws-kinesisanalytics/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-kinesisanalytics/.npmignore +++ b/packages/@aws-cdk/aws-kinesisanalytics/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kinesisfirehose/.npmignore b/packages/@aws-cdk/aws-kinesisfirehose/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-kinesisfirehose/.npmignore +++ b/packages/@aws-cdk/aws-kinesisfirehose/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-kms/.npmignore b/packages/@aws-cdk/aws-kms/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-kms/.npmignore +++ b/packages/@aws-cdk/aws-kms/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lakeformation/.npmignore b/packages/@aws-cdk/aws-lakeformation/.npmignore index 5c003cc4e3040..de98f3be1b6f4 100644 --- a/packages/@aws-cdk/aws-lakeformation/.npmignore +++ b/packages/@aws-cdk/aws-lakeformation/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-destinations/.npmignore b/packages/@aws-cdk/aws-lambda-destinations/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-lambda-destinations/.npmignore +++ b/packages/@aws-cdk/aws-lambda-destinations/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-event-sources/.npmignore b/packages/@aws-cdk/aws-lambda-event-sources/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-lambda-event-sources/.npmignore +++ b/packages/@aws-cdk/aws-lambda-event-sources/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-nodejs/.npmignore b/packages/@aws-cdk/aws-lambda-nodejs/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/.npmignore +++ b/packages/@aws-cdk/aws-lambda-nodejs/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-python/.npmignore b/packages/@aws-cdk/aws-lambda-python/.npmignore index b70bd617fba2d..1b4217fb1a9f0 100644 --- a/packages/@aws-cdk/aws-lambda-python/.npmignore +++ b/packages/@aws-cdk/aws-lambda-python/.npmignore @@ -24,3 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml + +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/.npmignore b/packages/@aws-cdk/aws-lambda/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-lambda/.npmignore +++ b/packages/@aws-cdk/aws-lambda/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs-destinations/.npmignore b/packages/@aws-cdk/aws-logs-destinations/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-logs-destinations/.npmignore +++ b/packages/@aws-cdk/aws-logs-destinations/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-logs/.npmignore b/packages/@aws-cdk/aws-logs/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-logs/.npmignore +++ b/packages/@aws-cdk/aws-logs/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-macie/.npmignore b/packages/@aws-cdk/aws-macie/.npmignore index c8874799485a3..5bd978c36b820 100644 --- a/packages/@aws-cdk/aws-macie/.npmignore +++ b/packages/@aws-cdk/aws-macie/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-managedblockchain/.npmignore b/packages/@aws-cdk/aws-managedblockchain/.npmignore index 5c003cc4e3040..de98f3be1b6f4 100644 --- a/packages/@aws-cdk/aws-managedblockchain/.npmignore +++ b/packages/@aws-cdk/aws-managedblockchain/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-mediaconvert/.npmignore b/packages/@aws-cdk/aws-mediaconvert/.npmignore index a7c5b49852b3b..c2827f80c26db 100644 --- a/packages/@aws-cdk/aws-mediaconvert/.npmignore +++ b/packages/@aws-cdk/aws-mediaconvert/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-medialive/.npmignore b/packages/@aws-cdk/aws-medialive/.npmignore index 5c003cc4e3040..de98f3be1b6f4 100644 --- a/packages/@aws-cdk/aws-medialive/.npmignore +++ b/packages/@aws-cdk/aws-medialive/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-mediastore/.npmignore b/packages/@aws-cdk/aws-mediastore/.npmignore index 5c003cc4e3040..de98f3be1b6f4 100644 --- a/packages/@aws-cdk/aws-mediastore/.npmignore +++ b/packages/@aws-cdk/aws-mediastore/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-msk/.npmignore b/packages/@aws-cdk/aws-msk/.npmignore index 917201c845418..f3eaded585e2d 100644 --- a/packages/@aws-cdk/aws-msk/.npmignore +++ b/packages/@aws-cdk/aws-msk/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-neptune/.npmignore b/packages/@aws-cdk/aws-neptune/.npmignore index 3dffd1ce79a72..2892fc6e99416 100644 --- a/packages/@aws-cdk/aws-neptune/.npmignore +++ b/packages/@aws-cdk/aws-neptune/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-networkmanager/.npmignore b/packages/@aws-cdk/aws-networkmanager/.npmignore index c8874799485a3..5bd978c36b820 100644 --- a/packages/@aws-cdk/aws-networkmanager/.npmignore +++ b/packages/@aws-cdk/aws-networkmanager/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-opsworks/.npmignore b/packages/@aws-cdk/aws-opsworks/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-opsworks/.npmignore +++ b/packages/@aws-cdk/aws-opsworks/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-opsworkscm/.npmignore b/packages/@aws-cdk/aws-opsworkscm/.npmignore index ab90672b1d91e..207e92300ba4a 100644 --- a/packages/@aws-cdk/aws-opsworkscm/.npmignore +++ b/packages/@aws-cdk/aws-opsworkscm/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-pinpoint/.npmignore b/packages/@aws-cdk/aws-pinpoint/.npmignore index 917201c845418..f3eaded585e2d 100644 --- a/packages/@aws-cdk/aws-pinpoint/.npmignore +++ b/packages/@aws-cdk/aws-pinpoint/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-pinpointemail/.npmignore b/packages/@aws-cdk/aws-pinpointemail/.npmignore index 5c003cc4e3040..de98f3be1b6f4 100644 --- a/packages/@aws-cdk/aws-pinpointemail/.npmignore +++ b/packages/@aws-cdk/aws-pinpointemail/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-qldb/.npmignore b/packages/@aws-cdk/aws-qldb/.npmignore index 5c003cc4e3040..de98f3be1b6f4 100644 --- a/packages/@aws-cdk/aws-qldb/.npmignore +++ b/packages/@aws-cdk/aws-qldb/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ram/.npmignore b/packages/@aws-cdk/aws-ram/.npmignore index ab90672b1d91e..207e92300ba4a 100644 --- a/packages/@aws-cdk/aws-ram/.npmignore +++ b/packages/@aws-cdk/aws-ram/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-rds/.npmignore b/packages/@aws-cdk/aws-rds/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-rds/.npmignore +++ b/packages/@aws-cdk/aws-rds/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-redshift/.npmignore b/packages/@aws-cdk/aws-redshift/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-redshift/.npmignore +++ b/packages/@aws-cdk/aws-redshift/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-resourcegroups/.npmignore b/packages/@aws-cdk/aws-resourcegroups/.npmignore index c8874799485a3..5bd978c36b820 100644 --- a/packages/@aws-cdk/aws-resourcegroups/.npmignore +++ b/packages/@aws-cdk/aws-resourcegroups/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-robomaker/.npmignore b/packages/@aws-cdk/aws-robomaker/.npmignore index ab90672b1d91e..207e92300ba4a 100644 --- a/packages/@aws-cdk/aws-robomaker/.npmignore +++ b/packages/@aws-cdk/aws-robomaker/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53-patterns/.npmignore b/packages/@aws-cdk/aws-route53-patterns/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-route53-patterns/.npmignore +++ b/packages/@aws-cdk/aws-route53-patterns/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53-targets/.npmignore b/packages/@aws-cdk/aws-route53-targets/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-route53-targets/.npmignore +++ b/packages/@aws-cdk/aws-route53-targets/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53/.npmignore b/packages/@aws-cdk/aws-route53/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-route53/.npmignore +++ b/packages/@aws-cdk/aws-route53/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-route53resolver/.npmignore b/packages/@aws-cdk/aws-route53resolver/.npmignore index ab90672b1d91e..207e92300ba4a 100644 --- a/packages/@aws-cdk/aws-route53resolver/.npmignore +++ b/packages/@aws-cdk/aws-route53resolver/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3-assets/.npmignore b/packages/@aws-cdk/aws-s3-assets/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-s3-assets/.npmignore +++ b/packages/@aws-cdk/aws-s3-assets/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3-deployment/.npmignore b/packages/@aws-cdk/aws-s3-deployment/.npmignore index f1b35d10f16cf..6ed30427bcfa6 100644 --- a/packages/@aws-cdk/aws-s3-deployment/.npmignore +++ b/packages/@aws-cdk/aws-s3-deployment/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3-notifications/.npmignore b/packages/@aws-cdk/aws-s3-notifications/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-s3-notifications/.npmignore +++ b/packages/@aws-cdk/aws-s3-notifications/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-s3/.npmignore b/packages/@aws-cdk/aws-s3/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-s3/.npmignore +++ b/packages/@aws-cdk/aws-s3/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-sagemaker/.npmignore b/packages/@aws-cdk/aws-sagemaker/.npmignore index 3ac7fc56cea02..142da412995b7 100644 --- a/packages/@aws-cdk/aws-sagemaker/.npmignore +++ b/packages/@aws-cdk/aws-sagemaker/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-sam/.npmignore b/packages/@aws-cdk/aws-sam/.npmignore index 3dffd1ce79a72..2892fc6e99416 100644 --- a/packages/@aws-cdk/aws-sam/.npmignore +++ b/packages/@aws-cdk/aws-sam/.npmignore @@ -27,4 +27,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-sdb/.npmignore b/packages/@aws-cdk/aws-sdb/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-sdb/.npmignore +++ b/packages/@aws-cdk/aws-sdb/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-secretsmanager/.npmignore b/packages/@aws-cdk/aws-secretsmanager/.npmignore index f937500da09a6..305e5b0db6ec1 100644 --- a/packages/@aws-cdk/aws-secretsmanager/.npmignore +++ b/packages/@aws-cdk/aws-secretsmanager/.npmignore @@ -25,4 +25,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-securityhub/.npmignore b/packages/@aws-cdk/aws-securityhub/.npmignore index 5c003cc4e3040..de98f3be1b6f4 100644 --- a/packages/@aws-cdk/aws-securityhub/.npmignore +++ b/packages/@aws-cdk/aws-securityhub/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-servicecatalog/.npmignore b/packages/@aws-cdk/aws-servicecatalog/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-servicecatalog/.npmignore +++ b/packages/@aws-cdk/aws-servicecatalog/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-servicediscovery/.npmignore b/packages/@aws-cdk/aws-servicediscovery/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-servicediscovery/.npmignore +++ b/packages/@aws-cdk/aws-servicediscovery/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ses-actions/.npmignore b/packages/@aws-cdk/aws-ses-actions/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-ses-actions/.npmignore +++ b/packages/@aws-cdk/aws-ses-actions/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ses/.npmignore b/packages/@aws-cdk/aws-ses/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-ses/.npmignore +++ b/packages/@aws-cdk/aws-ses/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-sns-subscriptions/.npmignore b/packages/@aws-cdk/aws-sns-subscriptions/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-sns-subscriptions/.npmignore +++ b/packages/@aws-cdk/aws-sns-subscriptions/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-sns/.npmignore b/packages/@aws-cdk/aws-sns/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-sns/.npmignore +++ b/packages/@aws-cdk/aws-sns/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-sqs/.npmignore b/packages/@aws-cdk/aws-sqs/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-sqs/.npmignore +++ b/packages/@aws-cdk/aws-sqs/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ssm/.npmignore b/packages/@aws-cdk/aws-ssm/.npmignore index 95a6e5fe5bb87..a94c531529866 100644 --- a/packages/@aws-cdk/aws-ssm/.npmignore +++ b/packages/@aws-cdk/aws-ssm/.npmignore @@ -22,4 +22,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-sso/.npmignore b/packages/@aws-cdk/aws-sso/.npmignore index 72b7fcab0a22a..7b8fb69082a0f 100644 --- a/packages/@aws-cdk/aws-sso/.npmignore +++ b/packages/@aws-cdk/aws-sso/.npmignore @@ -24,3 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out junit.xml + +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/.npmignore b/packages/@aws-cdk/aws-stepfunctions-tasks/.npmignore index a0bf754e3cc79..c28149f1ec41d 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/.npmignore +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/.npmignore @@ -22,4 +22,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions/.npmignore b/packages/@aws-cdk/aws-stepfunctions/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-stepfunctions/.npmignore +++ b/packages/@aws-cdk/aws-stepfunctions/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-synthetics/.npmignore b/packages/@aws-cdk/aws-synthetics/.npmignore index 548b39048e917..b3858c23d8230 100644 --- a/packages/@aws-cdk/aws-synthetics/.npmignore +++ b/packages/@aws-cdk/aws-synthetics/.npmignore @@ -23,4 +23,5 @@ tsconfig.json jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-transfer/.npmignore b/packages/@aws-cdk/aws-transfer/.npmignore index 5c003cc4e3040..de98f3be1b6f4 100644 --- a/packages/@aws-cdk/aws-transfer/.npmignore +++ b/packages/@aws-cdk/aws-transfer/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-waf/.npmignore b/packages/@aws-cdk/aws-waf/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-waf/.npmignore +++ b/packages/@aws-cdk/aws-waf/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-wafregional/.npmignore b/packages/@aws-cdk/aws-wafregional/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-wafregional/.npmignore +++ b/packages/@aws-cdk/aws-wafregional/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-wafv2/.npmignore b/packages/@aws-cdk/aws-wafv2/.npmignore index a7c5b49852b3b..c2827f80c26db 100644 --- a/packages/@aws-cdk/aws-wafv2/.npmignore +++ b/packages/@aws-cdk/aws-wafv2/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/aws-workspaces/.npmignore b/packages/@aws-cdk/aws-workspaces/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/aws-workspaces/.npmignore +++ b/packages/@aws-cdk/aws-workspaces/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/cdk-assets-schema/.npmignore b/packages/@aws-cdk/cdk-assets-schema/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/cdk-assets-schema/.npmignore +++ b/packages/@aws-cdk/cdk-assets-schema/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/cloud-assembly-schema/.npmignore b/packages/@aws-cdk/cloud-assembly-schema/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/.npmignore +++ b/packages/@aws-cdk/cloud-assembly-schema/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/cloudformation-diff/.npmignore b/packages/@aws-cdk/cloudformation-diff/.npmignore index 582a6ea324723..6f149ce45fddd 100644 --- a/packages/@aws-cdk/cloudformation-diff/.npmignore +++ b/packages/@aws-cdk/cloudformation-diff/.npmignore @@ -18,4 +18,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/cloudformation-include/.npmignore b/packages/@aws-cdk/cloudformation-include/.npmignore index 5f0a7e632cc2b..89953b9a92f1b 100644 --- a/packages/@aws-cdk/cloudformation-include/.npmignore +++ b/packages/@aws-cdk/cloudformation-include/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/core/.npmignore b/packages/@aws-cdk/core/.npmignore index 90948e3dcecea..cab9567cc557d 100644 --- a/packages/@aws-cdk/core/.npmignore +++ b/packages/@aws-cdk/core/.npmignore @@ -26,4 +26,5 @@ tsconfig.json # exclude cdk artifacts **/cdk.out junit.xml -jest.config.js \ No newline at end of file +jest.config.js +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/core/lib/cfn-resource.ts b/packages/@aws-cdk/core/lib/cfn-resource.ts index c899d95b657c8..58e6820e4b5a7 100644 --- a/packages/@aws-cdk/core/lib/cfn-resource.ts +++ b/packages/@aws-cdk/core/lib/cfn-resource.ts @@ -146,6 +146,10 @@ export class CfnResource extends CfnRefElement { * If the override is nested, separate each nested level using a dot (.) in the path parameter. * If there is an array as part of the nesting, specify the index in the path. * + * To include a literal `.` in the property name, prefix with a `\`. In most + * programming languages you will need to write this as `"\\."` because the + * `\` itself will need to be escaped. + * * For example, * ```typescript * addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']) @@ -177,7 +181,7 @@ export class CfnResource extends CfnRefElement { * @param value - The value. Could be primitive or complex. */ public addOverride(path: string, value: any) { - const parts = path.split('.'); + const parts = splitOnPeriods(path); let curr: any = this.rawOverrides; while (parts.length > 1) { @@ -495,3 +499,25 @@ function deepMerge(target: any, ...sources: any[]) { return target; } + +/** + * Split on periods while processing escape characters \ + */ +function splitOnPeriods(x: string): string[] { + // Build this list in reverse because it's more convenient to get the "current" + // item by doing ret[0] than by ret[ret.length - 1]. + const ret = ['']; + for (let i = 0; i < x.length; i++) { + if (x[i] === '\\' && i + 1 < x.length) { + ret[0] += x[i + 1]; + i++; + } else if (x[i] === '.') { + ret.unshift(''); + } else { + ret[0] += x[i]; + } + } + + ret.reverse(); + return ret; +} \ No newline at end of file diff --git a/packages/@aws-cdk/core/test/resource.test.ts b/packages/@aws-cdk/core/test/resource.test.ts index a559a33658ba2..b883d11f8d752 100644 --- a/packages/@aws-cdk/core/test/resource.test.ts +++ b/packages/@aws-cdk/core/test/resource.test.ts @@ -586,6 +586,39 @@ nodeunitShim({ test.done(); }, + 'addOverride(p, v) will not split on escaped dots'(test: Test) { + // GIVEN + const stack = new Stack(); + const r = new CfnResource(stack, 'MyResource', { type: 'AWS::Resource::Type' }); + + // WHEN + r.addOverride(String.raw`Properties.Hello\.World.Foo\.Bar\.Baz`, 42); + r.addOverride(String.raw`Properties.Single\Back\Slashes`, 42); + r.addOverride(String.raw`Properties.Escaped\\.Back\\.Slashes`, 42); + r.addOverride(String.raw`Properties.DoublyEscaped\\\\Back\\\\Slashes`, 42); + r.addOverride('Properties.EndWith\\', 42); // Raw string cannot end with a backslash + + // THEN + test.deepEqual(toCloudFormation(stack), { + Resources: + { + MyResource: + { + Type: 'AWS::Resource::Type', + Properties: + { + 'Hello.World': { 'Foo.Bar.Baz': 42 }, + 'SingleBackSlashes': 42, + 'Escaped\\': { 'Back\\': { Slashes: 42 } }, + 'DoublyEscaped\\\\Back\\\\Slashes': 42, + 'EndWith\\': 42, + }, + }, + }, + }); + test.done(); + }, + 'addPropertyOverride(pp, v) is a sugar for overriding properties'(test: Test) { // GIVEN const stack = new Stack(); diff --git a/packages/@aws-cdk/custom-resources/.npmignore b/packages/@aws-cdk/custom-resources/.npmignore index 3b641cc6c559c..fcd1908ac39cb 100644 --- a/packages/@aws-cdk/custom-resources/.npmignore +++ b/packages/@aws-cdk/custom-resources/.npmignore @@ -24,4 +24,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/cx-api/.npmignore b/packages/@aws-cdk/cx-api/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/cx-api/.npmignore +++ b/packages/@aws-cdk/cx-api/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/.npmignore b/packages/@aws-cdk/pipelines/.npmignore index 43090522285b1..8b1d5e48f3c78 100644 --- a/packages/@aws-cdk/pipelines/.npmignore +++ b/packages/@aws-cdk/pipelines/.npmignore @@ -25,3 +25,4 @@ tsconfig.json jest.config.js junit.xml package/node_modules +test/ diff --git a/packages/@aws-cdk/pipelines/lib/synths/simple-synth-action.ts b/packages/@aws-cdk/pipelines/lib/synths/simple-synth-action.ts index 785ef9cc46bc7..8365a3404e120 100644 --- a/packages/@aws-cdk/pipelines/lib/synths/simple-synth-action.ts +++ b/packages/@aws-cdk/pipelines/lib/synths/simple-synth-action.ts @@ -327,7 +327,7 @@ export class SimpleSynthAction implements codepipeline.IAction, iam.IGrantable { // here because the pipeline will definitely restart if projectName changes. // (Resolve tokens) const projectConfigHash = hash(Stack.of(scope).resolve({ - environment, + environment: serializeBuildEnvironment(environment), buildSpecString: buildSpec.toBuildSpec(), environmentVariables, })); @@ -486,3 +486,18 @@ function hash(obj: A) { d.update(JSON.stringify(obj)); return d.digest('hex'); } + +/** + * Serialize a build environment to data (get rid of constructs & objects), so we can JSON.stringify it + */ +function serializeBuildEnvironment(env: codebuild.BuildEnvironment) { + return { + privileged: env.privileged, + environmentVariables: env.environmentVariables, + type: env.buildImage?.type, + imageId: env.buildImage?.imageId, + computeType: env.computeType, + imagePullPrincipalType: env.buildImage?.imagePullPrincipalType, + secretsManagerArn: env.buildImage?.secretsManagerCredentials?.secretArn, + }; +} \ No newline at end of file diff --git a/packages/@aws-cdk/pipelines/package.json b/packages/@aws-cdk/pipelines/package.json index 4d1fa3a335370..d50e7ceb07726 100644 --- a/packages/@aws-cdk/pipelines/package.json +++ b/packages/@aws-cdk/pipelines/package.json @@ -37,6 +37,7 @@ "nodeunit": "^0.11.3", "pkglint": "0.0.0", "@aws-cdk/aws-s3": "0.0.0", + "@aws-cdk/aws-ecr": "0.0.0", "@aws-cdk/aws-ecr-assets": "0.0.0" }, "peerDependencies": { diff --git a/packages/@aws-cdk/pipelines/test/builds.test.ts b/packages/@aws-cdk/pipelines/test/builds.test.ts index fdb9171aedc73..8b753b5cbdc21 100644 --- a/packages/@aws-cdk/pipelines/test/builds.test.ts +++ b/packages/@aws-cdk/pipelines/test/builds.test.ts @@ -3,6 +3,7 @@ import '@aws-cdk/assert/jest'; import * as cbuild from '@aws-cdk/aws-codebuild'; import * as codepipeline from '@aws-cdk/aws-codepipeline'; import * as ec2 from '@aws-cdk/aws-ec2'; +import * as ecr from '@aws-cdk/aws-ecr'; import * as s3 from '@aws-cdk/aws-s3'; import { Stack } from '@aws-cdk/core'; import * as cdkp from '../lib'; @@ -405,6 +406,25 @@ test('SimpleSynthAction is IGrantable', () => { }); }); +test('SimpleSynthAction can reference an imported ECR repo', () => { + // Repro from https://github.com/aws/aws-cdk/issues/10535 + + // WHEN + new TestGitHubNpmPipeline(pipelineStack, 'Cdk', { + sourceArtifact, + cloudAssemblyArtifact, + synthAction: cdkp.SimpleSynthAction.standardNpmSynth({ + sourceArtifact, + cloudAssemblyArtifact, + environment: { + buildImage: cbuild.LinuxBuildImage.fromEcrRepository( + ecr.Repository.fromRepositoryName(pipelineStack, 'ECRImage', 'my-repo-name'), + ), + }, + }), + }); +}); + function npmYarnBuild(npmYarn: string) { if (npmYarn === 'npm') { return cdkp.SimpleSynthAction.standardNpmSynth; } if (npmYarn === 'yarn') { return cdkp.SimpleSynthAction.standardYarnSynth; } diff --git a/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets.expected.json b/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets.expected.json index 4c8786774af7e..b23bccdd40701 100644 --- a/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets.expected.json +++ b/packages/@aws-cdk/pipelines/test/integ.pipeline-with-assets.expected.json @@ -489,7 +489,7 @@ "ProjectName": { "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" }, - "EnvironmentVariables": "[{\"name\":\"_PROJECT_CONFIG_HASH\",\"type\":\"PLAINTEXT\",\"value\":\"7f09efece2ae66563f27569c480f9602225200051089f57486c5fa0b52095956\"}]" + "EnvironmentVariables": "[{\"name\":\"_PROJECT_CONFIG_HASH\",\"type\":\"PLAINTEXT\",\"value\":\"ea30b07764cb215963f4b0c292b5a06993fc3dd94621fbdc1c618e0f1e0dae10\"}]" }, "InputArtifacts": [ { @@ -1695,4 +1695,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/pipelines/test/integ.pipeline.expected.json b/packages/@aws-cdk/pipelines/test/integ.pipeline.expected.json index 06d75a873fd53..c9cf293e1c173 100644 --- a/packages/@aws-cdk/pipelines/test/integ.pipeline.expected.json +++ b/packages/@aws-cdk/pipelines/test/integ.pipeline.expected.json @@ -445,7 +445,7 @@ "ProjectName": { "Ref": "PipelineBuildSynthCdkBuildProject6BEFA8E6" }, - "EnvironmentVariables": "[{\"name\":\"_PROJECT_CONFIG_HASH\",\"type\":\"PLAINTEXT\",\"value\":\"7f09efece2ae66563f27569c480f9602225200051089f57486c5fa0b52095956\"}]" + "EnvironmentVariables": "[{\"name\":\"_PROJECT_CONFIG_HASH\",\"type\":\"PLAINTEXT\",\"value\":\"ea30b07764cb215963f4b0c292b5a06993fc3dd94621fbdc1c618e0f1e0dae10\"}]" }, "InputArtifacts": [ { @@ -1391,4 +1391,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/region-info/.npmignore b/packages/@aws-cdk/region-info/.npmignore index d32b63723f317..4e84b879a486f 100644 --- a/packages/@aws-cdk/region-info/.npmignore +++ b/packages/@aws-cdk/region-info/.npmignore @@ -21,4 +21,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@aws-cdk/yaml-cfn/.npmignore b/packages/@aws-cdk/yaml-cfn/.npmignore index bca0ae2513f1e..63ab95621c764 100644 --- a/packages/@aws-cdk/yaml-cfn/.npmignore +++ b/packages/@aws-cdk/yaml-cfn/.npmignore @@ -23,4 +23,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/@monocdk-experiment/rewrite-imports/.npmignore b/packages/@monocdk-experiment/rewrite-imports/.npmignore index 1a0946f499b8d..4a2955c9ce9f9 100644 --- a/packages/@monocdk-experiment/rewrite-imports/.npmignore +++ b/packages/@monocdk-experiment/rewrite-imports/.npmignore @@ -13,4 +13,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index 55c8f73f38b4b..02b2d7db98e2d 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -259,6 +259,7 @@ "@types/node": "^10.17.35", "cdk-build-tools": "0.0.0", "constructs": "^3.0.4", + "cdk8s": "^0.30.0", "fs-extra": "^9.0.1", "pkglint": "0.0.0", "ts-node": "^9.0.0", @@ -266,7 +267,8 @@ "ubergen": "0.0.0" }, "peerDependencies": { - "constructs": "^3.0.4" + "constructs": "^3.0.4", + "cdk8s": "^0.30.0" }, "homepage": "https://github.com/aws/aws-cdk", "engines": { diff --git a/packages/aws-cdk/lib/api/util/cloudformation.ts b/packages/aws-cdk/lib/api/util/cloudformation.ts index 4c75b88c445c0..63f4558d32bcd 100644 --- a/packages/aws-cdk/lib/api/util/cloudformation.ts +++ b/packages/aws-cdk/lib/api/util/cloudformation.ts @@ -242,9 +242,15 @@ export async function waitForChangeSet(cfn: CloudFormation, stackName: string, c * there are changes to Outputs, the change set can still be executed. */ export function changeSetHasNoChanges(description: CloudFormation.DescribeChangeSetOutput) { + const noChangeErrorPrefixes = [ + // Error message for a regular template + 'The submitted information didn\'t contain changes.', + // Error message when a Transform is involved (see #10650) + 'No updates are to be performed.', + ]; + return description.Status === 'FAILED' - && description.StatusReason - && description.StatusReason.startsWith('The submitted information didn\'t contain changes.'); + && noChangeErrorPrefixes.some(p => (description.StatusReason ?? '').startsWith(p)); } /** diff --git a/packages/aws-cdk/test/api/deploy-stack.test.ts b/packages/aws-cdk/test/api/deploy-stack.test.ts index e4507d76b1da4..6e45a20acc770 100644 --- a/packages/aws-cdk/test/api/deploy-stack.test.ts +++ b/packages/aws-cdk/test/api/deploy-stack.test.ts @@ -46,6 +46,7 @@ beforeEach(() => { ], })), createChangeSet: jest.fn((_o) => ({})), + deleteChangeSet: jest.fn((_o) => ({})), describeChangeSet: jest.fn((_o) => ({ Status: 'CREATE_COMPLETE', Changes: [], @@ -376,6 +377,24 @@ test('deploy not skipped if template did not change but tags changed', async () expect(cfnMocks.getTemplate).toHaveBeenCalledWith({ StackName: 'withouterrors', TemplateStage: 'Original' }); }); +test('deployStack reports no change if describeChangeSet returns specific error', async () => { + cfnMocks.describeChangeSet?.mockImplementation(() => ({ + Status: 'FAILED', + StatusReason: 'No updates are to be performed.', + })); + + // WHEN + const deployResult = await deployStack({ + stack: FAKE_STACK, + sdk, + sdkProvider, + resolvedEnvironment: mockResolvedEnvironment(), + }); + + // THEN + expect(deployResult.noOp).toEqual(true); +}); + test('deploy not skipped if template did not change but one tag removed', async () => { // GIVEN givenStackExists({ diff --git a/packages/awslint/.npmignore b/packages/awslint/.npmignore index dd1dbf2be01be..7cb354bd2b155 100644 --- a/packages/awslint/.npmignore +++ b/packages/awslint/.npmignore @@ -8,4 +8,5 @@ dist *.tsbuildinfo tsconfig.json .eslintrc.js -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/cdk-assets/.npmignore b/packages/cdk-assets/.npmignore index de7dfbff2926f..45b8808bdd7ac 100644 --- a/packages/cdk-assets/.npmignore +++ b/packages/cdk-assets/.npmignore @@ -26,4 +26,5 @@ jest.config.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/monocdk-experiment/.npmignore b/packages/monocdk-experiment/.npmignore index b5bc540300d0f..eb24dc7eb2308 100644 --- a/packages/monocdk-experiment/.npmignore +++ b/packages/monocdk-experiment/.npmignore @@ -23,4 +23,5 @@ tsconfig.json .eslintrc.js # exclude cdk artifacts **/cdk.out -junit.xml \ No newline at end of file +junit.xml +test/ \ No newline at end of file diff --git a/packages/monocdk-experiment/package.json b/packages/monocdk-experiment/package.json index da8000b78cf3d..14496548649c7 100644 --- a/packages/monocdk-experiment/package.json +++ b/packages/monocdk-experiment/package.json @@ -258,6 +258,7 @@ "@types/node": "^10.17.35", "cdk-build-tools": "0.0.0", "constructs": "^3.0.4", + "cdk8s": "^0.30.0", "fs-extra": "^9.0.1", "pkglint": "0.0.0", "ts-node": "^9.0.0", @@ -265,7 +266,8 @@ "ubergen": "0.0.0" }, "peerDependencies": { - "constructs": "^3.0.4" + "constructs": "^3.0.4", + "cdk8s": "^0.30.0" }, "homepage": "https://github.com/aws/aws-cdk", "engines": { diff --git a/tools/pkglint/lib/rules.ts b/tools/pkglint/lib/rules.ts index 77fce1a03d423..ca240dbd737e1 100644 --- a/tools/pkglint/lib/rules.ts +++ b/tools/pkglint/lib/rules.ts @@ -574,6 +574,21 @@ export class NoTsBuildInfo extends ValidationRule { } } +export class NoTestsInNpmPackage extends ValidationRule { + public readonly name = 'npmignore/test'; + + public validate(pkg: PackageJson): void { + // skip private packages + if (pkg.json.private) { return; } + + // Skip the CLI package, as its 'test' subdirectory is used at runtime. + if (pkg.packageName === 'aws-cdk') { return; } + + // Exclude 'test/' directories from being packaged + fileShouldContain(this.name, pkg, '.npmignore', 'test/'); + } +} + export class NoTsConfig extends ValidationRule { public readonly name = 'npmignore/tsconfig'; diff --git a/tools/ubergen/package.json b/tools/ubergen/package.json index 8e2e2e0eaa5a9..4698e84f54300 100644 --- a/tools/ubergen/package.json +++ b/tools/ubergen/package.json @@ -12,8 +12,8 @@ "ubergen": "bin/ubergen" }, "scripts": { - "build": "tsc -b && chmod +x bin/ubergen && eslint . --ext=.ts", - "watch": "tsc -b -w", + "build": "cdk-build", + "watch": "cdk-watch", "pkglint": "pkglint -f", "test": "echo success", "build+test+package": "npm run build+test",