Skip to content

Commit

Permalink
Merge branch 'master' into huijbers/pipelines-tags
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Sep 28, 2020
2 parents 527c94e + 350105a commit 4106f9d
Show file tree
Hide file tree
Showing 43 changed files with 3,483 additions and 88 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.64.1](https://github.com/aws/aws-cdk/compare/v1.64.0...v1.64.1) (2020-09-25)


### Bug Fixes

* **eks:** `KubernetesPatch` and `FargateCluster` creates a circular dependency and breaks deployment ([#10536](https://github.com/aws/aws-cdk/issues/10536)) ([f0f8a63](https://github.com/aws/aws-cdk/commit/f0f8a63c98e8a7ff5bedcf271a78fcb417988378)), closes [#10528](https://github.com/aws/aws-cdk/issues/10528)

## [1.64.0](https://github.com/aws/aws-cdk/compare/v1.63.0...v1.64.0) (2020-09-22)


Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"tools/*"
],
"rejectCycles": "true",
"version": "1.64.0"
"version": "1.64.1"
}
4 changes: 3 additions & 1 deletion packages/@aws-cdk/aws-codebuild/lib/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,9 @@ export class Project extends ProjectBase {
environment: this.renderEnvironment(props.environment, environmentVariables),
fileSystemLocations: Lazy.anyValue({ produce: () => this.renderFileSystemLocations() }),
// lazy, because we have a setter for it in setEncryptionKey
encryptionKey: Lazy.stringValue({ produce: () => this._encryptionKey && this._encryptionKey.keyArn }),
// The 'alias/aws/s3' default is necessary because leaving the `encryptionKey` field
// empty will not remove existing encryptionKeys during an update (ref. t/D17810523)
encryptionKey: Lazy.stringValue({ produce: () => this._encryptionKey ? this._encryptionKey.keyArn : 'alias/aws/s3' }),
badgeEnabled: props.badge,
cache: cache._toCloudFormation(),
name: this.physicalName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@
"Source": {
"BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"ls\"\n ]\n }\n }\n}",
"Type": "NO_SOURCE"
}
},
"EncryptionKey": "alias/aws/s3"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@
]
},
"Type": "S3"
}
},
"EncryptionKey": "alias/aws/s3"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,9 @@
"Source": {
"BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"echo \\\"Hello, CodeBuild!\\\"\"\n ]\n }\n }\n}",
"Type": "NO_SOURCE"
}
},
"EncryptionKey": "alias/aws/s3"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@
"Source": {
"BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"ls\"\n ]\n }\n }\n}",
"Type": "NO_SOURCE"
}
},
"EncryptionKey": "alias/aws/s3"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,9 @@
"Source": {
"BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"ls\"\n ]\n }\n }\n}",
"Type": "NO_SOURCE"
}
},
"EncryptionKey": "alias/aws/s3"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@
"Source": {
"BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"ls\"\n ]\n }\n }\n}",
"Type": "NO_SOURCE"
}
},
"EncryptionKey": "alias/aws/s3"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@
"Location": "https://github.com/aws/aws-cdk.git",
"ReportBuildStatus": false,
"Type": "GITHUB"
}
},
"EncryptionKey": "alias/aws/s3"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@
]
},
"Type": "S3"
}
},
"EncryptionKey": "alias/aws/s3"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"Resources": {
"MyBucketF68F3FF0": {
"DeletionPolicy": "Delete",
"Type": "AWS::S3::Bucket",
"UpdateReplacePolicy": "Delete",
"Type": "AWS::S3::Bucket"
"DeletionPolicy": "Delete"
},
"MyProjectRole9BBE5233": {
"Type": "AWS::IAM::Role",
Expand Down Expand Up @@ -133,7 +133,9 @@
"Properties": {
"Artifacts": {
"ArtifactIdentifier": "AddArtifact1",
"Location": { "Ref": "MyBucketF68F3FF0" },
"Location": {
"Ref": "MyBucketF68F3FF0"
},
"NamespaceType": "NONE",
"OverrideArtifactName": true,
"Packaging": "ZIP",
Expand All @@ -155,9 +157,9 @@
"Source": {
"BuildSpec": "{\n \"version\": \"0.2\"\n}",
"Type": "NO_SOURCE"
}
},
"EncryptionKey": "alias/aws/s3"
}
}
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@
"BuildSpec": "{\n \"version\": \"0.2\"\n}",
"Type": "NO_SOURCE"
},
"EncryptionKey": "alias/aws/s3",
"FileSystemLocations": [
{
"Identifier": "myidentifier",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
"BuildSpec": "{\n \"version\": \"0.2\"\n}",
"Type": "NO_SOURCE"
},
"EncryptionKey": "alias/aws/s3",
"SecondaryArtifacts": [
{
"ArtifactIdentifier": "AddArtifact1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@
"BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"build\": {\n \"commands\": [\n \"echo \\\"Nothing to do!\\\"\"\n ]\n }\n }\n}",
"Type": "NO_SOURCE"
},
"EncryptionKey": "alias/aws/s3",
"VpcConfig": {
"SecurityGroupIds": [
{
Expand Down
18 changes: 18 additions & 0 deletions packages/@aws-cdk/aws-codebuild/test/test.codebuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export = {
'Image': 'aws/codebuild/standard:1.0',
'ComputeType': 'BUILD_GENERAL1_SMALL',
},
'EncryptionKey': 'alias/aws/s3',
},
},
},
Expand Down Expand Up @@ -331,6 +332,7 @@ export = {
'GitCloneDepth': 2,
'Type': 'CODECOMMIT',
},
'EncryptionKey': 'alias/aws/s3',
},
},
},
Expand Down Expand Up @@ -532,6 +534,7 @@ export = {
},
'Type': 'S3',
},
'EncryptionKey': 'alias/aws/s3',
},
},
},
Expand Down Expand Up @@ -800,6 +803,21 @@ export = {
test.done();
},

'no KMS Key defaults to default S3 managed key'(test: Test) {
// GIVEN
const stack = new cdk.Stack();

// WHEN
new codebuild.PipelineProject(stack, 'MyProject');

// THEN
expect(stack).to(haveResourceLike('AWS::CodeBuild::Project', {
EncryptionKey: 'alias/aws/s3',
}));

test.done();
},

'with a KMS Key adds decrypt permissions to the CodeBuild Role'(test: Test) {
const stack = new cdk.Stack();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -614,8 +614,9 @@
},
"Source": {
"Type": "CODEPIPELINE"
}
},
"EncryptionKey": "alias/aws/s3"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,8 @@
"Source": {
"BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"pre_build\": {\n \"commands\": \"$(aws ecr get-login --region $AWS_DEFAULT_REGION --no-include-email)\"\n },\n \"build\": {\n \"commands\": \"docker build -t $REPOSITORY_URI:latest .\"\n },\n \"post_build\": {\n \"commands\": [\n \"docker push $REPOSITORY_URI:latest\",\n \"printf '[{ \\\"name\\\": \\\"Container\\\", \\\"imageUri\\\": \\\"%s\\\" }]' $REPOSITORY_URI:latest > imagedefinitions.json\"\n ]\n }\n },\n \"artifacts\": {\n \"files\": \"imagedefinitions.json\"\n }\n}",
"Type": "CODEPIPELINE"
}
},
"EncryptionKey": "alias/aws/s3"
}
},
"MyPipelineRoleC0D47CA4": {
Expand Down Expand Up @@ -1041,4 +1042,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-eks/lib/k8s-patch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class KubernetesPatch extends Construct {
super(scope, id);

const stack = Stack.of(this);
const provider = KubectlProvider.getOrCreate(scope, props.cluster);
const provider = KubectlProvider.getOrCreate(this, props.cluster);

new CustomResource(this, 'Resource', {
serviceToken: provider.serviceToken,
Expand Down
Loading

0 comments on commit 4106f9d

Please sign in to comment.