aws-delivlib 13.4.8 → 13.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdk.out/{asset.3044256b9586ecb8a7709713aaca30ceb34f699e3f93c8858f633aaf2f0c7140 → asset.6d84cdad0db1b0ef3c0db08c3e9ceb1ca56b3f8ffc4e1e1fd23f9a51b052e8fd}/index.js +4 -4
- package/cdk.out/cdk.out +1 -1
- package/cdk.out/delivlib-test.assets.json +6 -6
- package/cdk.out/delivlib-test.template.json +98 -2
- package/cdk.out/manifest.json +88 -61
- package/cdk.out/tree.json +522 -411
- package/lib/auto-build.js +2 -1
- package/lib/auto-build.ts +1 -0
- package/lib/custom-resource-handlers/src/certificate-signing-request.tsbuildinfo +1 -1
- package/lib/custom-resource-handlers/src/pgp-secret.tsbuildinfo +1 -1
- package/lib/custom-resource-handlers/src/private-key.tsbuildinfo +1 -1
- package/lib/pull-request/pr.d.ts +6 -0
- package/lib/pull-request/pr.js +2 -1
- package/lib/pull-request/pr.ts +8 -0
- package/package.json +12 -10
|
@@ -1371,10 +1371,10 @@ var require_node = __commonJS({
|
|
|
1371
1371
|
const { namespace: name, useColors: useColors2 } = this;
|
|
1372
1372
|
if (useColors2) {
|
|
1373
1373
|
const c = this.color;
|
|
1374
|
-
const colorCode = "
|
|
1375
|
-
const prefix = ` ${colorCode};1m${name}
|
|
1374
|
+
const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
|
|
1375
|
+
const prefix = ` ${colorCode};1m${name} \x1B[0m`;
|
|
1376
1376
|
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
|
|
1377
|
-
args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "
|
|
1377
|
+
args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
|
|
1378
1378
|
} else {
|
|
1379
1379
|
args[0] = getDate() + name + " " + args[0];
|
|
1380
1380
|
}
|
|
@@ -1707,7 +1707,7 @@ var require_follow_redirects = __commonJS({
|
|
|
1707
1707
|
var redirectUrlParts = url.parse(redirectUrl);
|
|
1708
1708
|
Object.assign(this._options, redirectUrlParts);
|
|
1709
1709
|
if (!(redirectUrlParts.host === currentHost || isSubdomainOf(redirectUrlParts.host, currentHost))) {
|
|
1710
|
-
removeMatchingHeaders(/^authorization$/i, this._options.headers);
|
|
1710
|
+
removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);
|
|
1711
1711
|
}
|
|
1712
1712
|
if (typeof this._options.beforeRedirect === "function") {
|
|
1713
1713
|
var responseDetails = { headers: response.headers };
|
package/cdk.out/cdk.out
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"16.0.0"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "16.0.0",
|
|
3
3
|
"files": {
|
|
4
4
|
"7820644cf1fdec7cec290ed6fdd561e35f4015d4dcf03a20f8035dda3c0ac88a": {
|
|
5
5
|
"source": {
|
|
@@ -225,21 +225,21 @@
|
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
},
|
|
228
|
-
"
|
|
228
|
+
"6d84cdad0db1b0ef3c0db08c3e9ceb1ca56b3f8ffc4e1e1fd23f9a51b052e8fd": {
|
|
229
229
|
"source": {
|
|
230
|
-
"path": "asset.
|
|
230
|
+
"path": "asset.6d84cdad0db1b0ef3c0db08c3e9ceb1ca56b3f8ffc4e1e1fd23f9a51b052e8fd",
|
|
231
231
|
"packaging": "zip"
|
|
232
232
|
},
|
|
233
233
|
"destinations": {
|
|
234
234
|
"712950704752-us-east-1": {
|
|
235
235
|
"bucketName": "cdk-hnb659fds-assets-712950704752-us-east-1",
|
|
236
|
-
"objectKey": "
|
|
236
|
+
"objectKey": "6d84cdad0db1b0ef3c0db08c3e9ceb1ca56b3f8ffc4e1e1fd23f9a51b052e8fd.zip",
|
|
237
237
|
"region": "us-east-1",
|
|
238
238
|
"assumeRoleArn": "arn:${AWS::Partition}:iam::712950704752:role/cdk-hnb659fds-file-publishing-role-712950704752-us-east-1"
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
},
|
|
242
|
-
"
|
|
242
|
+
"1f5cc2e42efd685df9228cdf77d32305244dc29b4988dedbc0e72123110b3660": {
|
|
243
243
|
"source": {
|
|
244
244
|
"path": "delivlib-test.template.json",
|
|
245
245
|
"packaging": "file"
|
|
@@ -247,7 +247,7 @@
|
|
|
247
247
|
"destinations": {
|
|
248
248
|
"712950704752-us-east-1": {
|
|
249
249
|
"bucketName": "cdk-hnb659fds-assets-712950704752-us-east-1",
|
|
250
|
-
"objectKey": "
|
|
250
|
+
"objectKey": "1f5cc2e42efd685df9228cdf77d32305244dc29b4988dedbc0e72123110b3660.json",
|
|
251
251
|
"region": "us-east-1",
|
|
252
252
|
"assumeRoleArn": "arn:${AWS::Partition}:iam::712950704752:role/cdk-hnb659fds-file-publishing-role-712950704752-us-east-1"
|
|
253
253
|
}
|
|
@@ -541,6 +541,56 @@
|
|
|
541
541
|
"aws:cdk:path": "delivlib-test/CodeCommitPipeline/BuildPipeline/ArtifactsBucket/Resource"
|
|
542
542
|
}
|
|
543
543
|
},
|
|
544
|
+
"CodeCommitPipelineBuildPipelineArtifactsBucketPolicy97EF6204": {
|
|
545
|
+
"Type": "AWS::S3::BucketPolicy",
|
|
546
|
+
"Properties": {
|
|
547
|
+
"Bucket": {
|
|
548
|
+
"Ref": "CodeCommitPipelineBuildPipelineArtifactsBucketED2813B3"
|
|
549
|
+
},
|
|
550
|
+
"PolicyDocument": {
|
|
551
|
+
"Statement": [
|
|
552
|
+
{
|
|
553
|
+
"Action": "s3:*",
|
|
554
|
+
"Condition": {
|
|
555
|
+
"Bool": {
|
|
556
|
+
"aws:SecureTransport": "false"
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
"Effect": "Deny",
|
|
560
|
+
"Principal": {
|
|
561
|
+
"AWS": "*"
|
|
562
|
+
},
|
|
563
|
+
"Resource": [
|
|
564
|
+
{
|
|
565
|
+
"Fn::GetAtt": [
|
|
566
|
+
"CodeCommitPipelineBuildPipelineArtifactsBucketED2813B3",
|
|
567
|
+
"Arn"
|
|
568
|
+
]
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"Fn::Join": [
|
|
572
|
+
"",
|
|
573
|
+
[
|
|
574
|
+
{
|
|
575
|
+
"Fn::GetAtt": [
|
|
576
|
+
"CodeCommitPipelineBuildPipelineArtifactsBucketED2813B3",
|
|
577
|
+
"Arn"
|
|
578
|
+
]
|
|
579
|
+
},
|
|
580
|
+
"/*"
|
|
581
|
+
]
|
|
582
|
+
]
|
|
583
|
+
}
|
|
584
|
+
]
|
|
585
|
+
}
|
|
586
|
+
],
|
|
587
|
+
"Version": "2012-10-17"
|
|
588
|
+
}
|
|
589
|
+
},
|
|
590
|
+
"Metadata": {
|
|
591
|
+
"aws:cdk:path": "delivlib-test/CodeCommitPipeline/BuildPipeline/ArtifactsBucket/Policy/Resource"
|
|
592
|
+
}
|
|
593
|
+
},
|
|
544
594
|
"CodeCommitPipelineBuildPipelineRole1843599A": {
|
|
545
595
|
"Type": "AWS::IAM::Role",
|
|
546
596
|
"Properties": {
|
|
@@ -2165,6 +2215,9 @@
|
|
|
2165
2215
|
"Source": {
|
|
2166
2216
|
"Type": "CODEPIPELINE"
|
|
2167
2217
|
},
|
|
2218
|
+
"Cache": {
|
|
2219
|
+
"Type": "NO_CACHE"
|
|
2220
|
+
},
|
|
2168
2221
|
"EncryptionKey": {
|
|
2169
2222
|
"Fn::GetAtt": [
|
|
2170
2223
|
"CodeCommitPipelineBuildPipelineArtifactsBucketEncryptionKey05A62A83",
|
|
@@ -2692,6 +2745,9 @@
|
|
|
2692
2745
|
"BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"pre_build\": {\n \"commands\": [\n \"echo \\\"Downloading scripts from s3://${SCRIPT_S3_BUCKET}/${SCRIPT_S3_KEY}\\\"\",\n \"aws s3 cp s3://${SCRIPT_S3_BUCKET}/${SCRIPT_S3_KEY} /tmp\",\n \"mkdir -p /tmp/scriptdir\",\n \"unzip /tmp/$(basename $SCRIPT_S3_KEY) -d /tmp/scriptdir\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"export SCRIPT_DIR=/tmp/scriptdir\",\n \"echo \\\"Running test.sh\\\"\",\n \"/bin/bash /tmp/scriptdir/test.sh\"\n ]\n }\n }\n}",
|
|
2693
2746
|
"Type": "NO_SOURCE"
|
|
2694
2747
|
},
|
|
2748
|
+
"Cache": {
|
|
2749
|
+
"Type": "NO_CACHE"
|
|
2750
|
+
},
|
|
2695
2751
|
"EncryptionKey": {
|
|
2696
2752
|
"Fn::GetAtt": [
|
|
2697
2753
|
"CodeCommitPipelineBuildPipelineArtifactsBucketEncryptionKey05A62A83",
|
|
@@ -3002,6 +3058,9 @@
|
|
|
3002
3058
|
"BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"pre_build\": {\n \"commands\": []\n },\n \"build\": {\n \"commands\": [\n \"Set-Variable -Name TEMPDIR -Value (New-TemporaryFile).DirectoryName\",\n \"aws s3 cp s3://$env:SCRIPT_S3_BUCKET/$env:SCRIPT_S3_KEY $TEMPDIR\\\\scripts.zip\",\n \"New-Item -ItemType Directory -Path $TEMPDIR\\\\scriptdir\",\n \"Expand-Archive -Path $TEMPDIR/scripts.zip -DestinationPath $TEMPDIR\\\\scriptdir\",\n \"$env:SCRIPT_DIR = \\\"$TEMPDIR\\\\scriptdir\\\"\",\n \"& $TEMPDIR\\\\scriptdir\\\\test.ps1\"\n ]\n }\n }\n}",
|
|
3003
3059
|
"Type": "NO_SOURCE"
|
|
3004
3060
|
},
|
|
3061
|
+
"Cache": {
|
|
3062
|
+
"Type": "NO_CACHE"
|
|
3063
|
+
},
|
|
3005
3064
|
"EncryptionKey": {
|
|
3006
3065
|
"Fn::GetAtt": [
|
|
3007
3066
|
"CodeCommitPipelineBuildPipelineArtifactsBucketEncryptionKey05A62A83",
|
|
@@ -3343,6 +3402,9 @@
|
|
|
3343
3402
|
},
|
|
3344
3403
|
"Type": "NO_SOURCE"
|
|
3345
3404
|
},
|
|
3405
|
+
"Cache": {
|
|
3406
|
+
"Type": "NO_CACHE"
|
|
3407
|
+
},
|
|
3346
3408
|
"EncryptionKey": {
|
|
3347
3409
|
"Fn::GetAtt": [
|
|
3348
3410
|
"CodeCommitPipelineBuildPipelineArtifactsBucketEncryptionKey05A62A83",
|
|
@@ -3653,6 +3715,9 @@
|
|
|
3653
3715
|
"BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"pre_build\": {\n \"commands\": [\n \"echo \\\"Downloading scripts from s3://${SCRIPT_S3_BUCKET}/${SCRIPT_S3_KEY}\\\"\",\n \"aws s3 cp s3://${SCRIPT_S3_BUCKET}/${SCRIPT_S3_KEY} /tmp\",\n \"mkdir -p /tmp/scriptdir\",\n \"unzip /tmp/$(basename $SCRIPT_S3_KEY) -d /tmp/scriptdir\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"export SCRIPT_DIR=/tmp/scriptdir\",\n \"echo \\\"Running void.sh\\\"\",\n \"/bin/bash /tmp/scriptdir/void.sh\",\n \"mkdir -p output1 output2\",\n \"echo '{\\\"name\\\": \\\"output1\\\", \\\"version\\\": \\\"1.2.3\\\", \\\"commit\\\": \\\"abcdef\\\"}' > output1/build.json\",\n \"echo '{\\\"name\\\": \\\"output2\\\", \\\"version\\\": \\\"1.2.3\\\", \\\"commit\\\": \\\"abcdef\\\"}' > output2/build.json\"\n ]\n }\n },\n \"artifacts\": {\n \"secondary-artifacts\": {\n \"artifact2\": {\n \"base-directory\": \"output2\",\n \"files\": [\n \"**/*\"\n ]\n },\n \"Artifact_delivlibtestCodeCommitPipelineGenerateTwoArtifacts54497DAA\": {\n \"base-directory\": \"output1\",\n \"files\": [\n \"**/*\"\n ]\n }\n }\n }\n}",
|
|
3654
3716
|
"Type": "NO_SOURCE"
|
|
3655
3717
|
},
|
|
3718
|
+
"Cache": {
|
|
3719
|
+
"Type": "NO_CACHE"
|
|
3720
|
+
},
|
|
3656
3721
|
"EncryptionKey": {
|
|
3657
3722
|
"Fn::GetAtt": [
|
|
3658
3723
|
"CodeCommitPipelineBuildPipelineArtifactsBucketEncryptionKey05A62A83",
|
|
@@ -3868,6 +3933,9 @@
|
|
|
3868
3933
|
"BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"pre_build\": {\n \"commands\": [\n \"echo \\\"Downloading scripts from s3://${SCRIPT_S3_BUCKET}/${SCRIPT_S3_KEY}\\\"\",\n \"aws s3 cp s3://${SCRIPT_S3_BUCKET}/${SCRIPT_S3_KEY} /tmp\",\n \"mkdir -p /tmp/scriptdir\",\n \"unzip /tmp/$(basename $SCRIPT_S3_KEY) -d /tmp/scriptdir\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"export SCRIPT_DIR=/tmp/scriptdir\",\n \"echo \\\"Running test.sh\\\"\",\n \"/bin/bash /tmp/scriptdir/test.sh\"\n ]\n }\n }\n}",
|
|
3869
3934
|
"Type": "NO_SOURCE"
|
|
3870
3935
|
},
|
|
3936
|
+
"Cache": {
|
|
3937
|
+
"Type": "NO_CACHE"
|
|
3938
|
+
},
|
|
3871
3939
|
"EncryptionKey": "alias/aws/s3"
|
|
3872
3940
|
},
|
|
3873
3941
|
"Metadata": {
|
|
@@ -4236,6 +4304,9 @@
|
|
|
4236
4304
|
"BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"pre_build\": {\n \"commands\": [\n \"echo \\\"Downloading scripts from s3://${SCRIPT_S3_BUCKET}/${SCRIPT_S3_KEY}\\\"\",\n \"aws s3 cp s3://${SCRIPT_S3_BUCKET}/${SCRIPT_S3_KEY} /tmp\",\n \"mkdir -p /tmp/scriptdir\",\n \"unzip /tmp/$(basename $SCRIPT_S3_KEY) -d /tmp/scriptdir\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"export SCRIPT_DIR=/tmp/scriptdir\",\n \"echo \\\"Running publish.sh\\\"\",\n \"/bin/bash /tmp/scriptdir/publish.sh\"\n ]\n }\n }\n}",
|
|
4237
4305
|
"Type": "NO_SOURCE"
|
|
4238
4306
|
},
|
|
4307
|
+
"Cache": {
|
|
4308
|
+
"Type": "NO_CACHE"
|
|
4309
|
+
},
|
|
4239
4310
|
"EncryptionKey": {
|
|
4240
4311
|
"Fn::GetAtt": [
|
|
4241
4312
|
"CodeCommitPipelineBuildPipelineArtifactsBucketEncryptionKey05A62A83",
|
|
@@ -4578,6 +4649,9 @@
|
|
|
4578
4649
|
"BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"pre_build\": {\n \"commands\": [\n \"echo \\\"Downloading scripts from s3://${SCRIPT_S3_BUCKET}/${SCRIPT_S3_KEY}\\\"\",\n \"aws s3 cp s3://${SCRIPT_S3_BUCKET}/${SCRIPT_S3_KEY} /tmp\",\n \"mkdir -p /tmp/scriptdir\",\n \"unzip /tmp/$(basename $SCRIPT_S3_KEY) -d /tmp/scriptdir\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"export SCRIPT_DIR=/tmp/scriptdir\",\n \"echo \\\"Running publish.sh\\\"\",\n \"/bin/bash /tmp/scriptdir/publish.sh\"\n ]\n }\n }\n}",
|
|
4579
4650
|
"Type": "NO_SOURCE"
|
|
4580
4651
|
},
|
|
4652
|
+
"Cache": {
|
|
4653
|
+
"Type": "NO_CACHE"
|
|
4654
|
+
},
|
|
4581
4655
|
"EncryptionKey": {
|
|
4582
4656
|
"Fn::GetAtt": [
|
|
4583
4657
|
"CodeCommitPipelineBuildPipelineArtifactsBucketEncryptionKey05A62A83",
|
|
@@ -4909,6 +4983,9 @@
|
|
|
4909
4983
|
"BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"pre_build\": {\n \"commands\": [\n \"echo \\\"Downloading scripts from s3://${SCRIPT_S3_BUCKET}/${SCRIPT_S3_KEY}\\\"\",\n \"aws s3 cp s3://${SCRIPT_S3_BUCKET}/${SCRIPT_S3_KEY} /tmp\",\n \"mkdir -p /tmp/scriptdir\",\n \"unzip /tmp/$(basename $SCRIPT_S3_KEY) -d /tmp/scriptdir\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"export SCRIPT_DIR=/tmp/scriptdir\",\n \"echo \\\"Running publish.sh\\\"\",\n \"/bin/bash /tmp/scriptdir/publish.sh\"\n ]\n }\n }\n}",
|
|
4910
4984
|
"Type": "NO_SOURCE"
|
|
4911
4985
|
},
|
|
4986
|
+
"Cache": {
|
|
4987
|
+
"Type": "NO_CACHE"
|
|
4988
|
+
},
|
|
4912
4989
|
"EncryptionKey": {
|
|
4913
4990
|
"Fn::GetAtt": [
|
|
4914
4991
|
"CodeCommitPipelineBuildPipelineArtifactsBucketEncryptionKey05A62A83",
|
|
@@ -5280,6 +5357,9 @@
|
|
|
5280
5357
|
"BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"pre_build\": {\n \"commands\": [\n \"echo \\\"Downloading scripts from s3://${SCRIPT_S3_BUCKET}/${SCRIPT_S3_KEY}\\\"\",\n \"aws s3 cp s3://${SCRIPT_S3_BUCKET}/${SCRIPT_S3_KEY} /tmp\",\n \"mkdir -p /tmp/scriptdir\",\n \"unzip /tmp/$(basename $SCRIPT_S3_KEY) -d /tmp/scriptdir\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"export SCRIPT_DIR=/tmp/scriptdir\",\n \"echo \\\"Running publish.sh\\\"\",\n \"/bin/bash /tmp/scriptdir/publish.sh\"\n ]\n }\n }\n}",
|
|
5281
5358
|
"Type": "NO_SOURCE"
|
|
5282
5359
|
},
|
|
5360
|
+
"Cache": {
|
|
5361
|
+
"Type": "NO_CACHE"
|
|
5362
|
+
},
|
|
5283
5363
|
"EncryptionKey": {
|
|
5284
5364
|
"Fn::GetAtt": [
|
|
5285
5365
|
"CodeCommitPipelineBuildPipelineArtifactsBucketEncryptionKey05A62A83",
|
|
@@ -5592,6 +5672,9 @@
|
|
|
5592
5672
|
"BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"pre_build\": {\n \"commands\": [\n \"echo \\\"Downloading scripts from s3://${SCRIPT_S3_BUCKET}/${SCRIPT_S3_KEY}\\\"\",\n \"aws s3 cp s3://${SCRIPT_S3_BUCKET}/${SCRIPT_S3_KEY} /tmp\",\n \"mkdir -p /tmp/scriptdir\",\n \"unzip /tmp/$(basename $SCRIPT_S3_KEY) -d /tmp/scriptdir\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"export SCRIPT_DIR=/tmp/scriptdir\",\n \"echo \\\"Running publish.sh\\\"\",\n \"/bin/bash /tmp/scriptdir/publish.sh\"\n ]\n }\n }\n}",
|
|
5593
5673
|
"Type": "NO_SOURCE"
|
|
5594
5674
|
},
|
|
5675
|
+
"Cache": {
|
|
5676
|
+
"Type": "NO_CACHE"
|
|
5677
|
+
},
|
|
5595
5678
|
"EncryptionKey": {
|
|
5596
5679
|
"Fn::GetAtt": [
|
|
5597
5680
|
"CodeCommitPipelineBuildPipelineArtifactsBucketEncryptionKey05A62A83",
|
|
@@ -5879,6 +5962,9 @@
|
|
|
5879
5962
|
"BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"pre_build\": {\n \"commands\": [\n \"echo \\\"Downloading scripts from s3://${SCRIPT_S3_BUCKET}/${SCRIPT_S3_KEY}\\\"\",\n \"aws s3 cp s3://${SCRIPT_S3_BUCKET}/${SCRIPT_S3_KEY} /tmp\",\n \"mkdir -p /tmp/scriptdir\",\n \"unzip /tmp/$(basename $SCRIPT_S3_KEY) -d /tmp/scriptdir\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"export SCRIPT_DIR=/tmp/scriptdir\",\n \"echo \\\"Running publish.sh\\\"\",\n \"/bin/bash /tmp/scriptdir/publish.sh\"\n ]\n }\n }\n}",
|
|
5880
5963
|
"Type": "NO_SOURCE"
|
|
5881
5964
|
},
|
|
5965
|
+
"Cache": {
|
|
5966
|
+
"Type": "NO_CACHE"
|
|
5967
|
+
},
|
|
5882
5968
|
"EncryptionKey": {
|
|
5883
5969
|
"Fn::GetAtt": [
|
|
5884
5970
|
"CodeCommitPipelineBuildPipelineArtifactsBucketEncryptionKey05A62A83",
|
|
@@ -6181,6 +6267,9 @@
|
|
|
6181
6267
|
"BuildSpec": "{\n \"version\": \"0.2\",\n \"phases\": {\n \"pre_build\": {\n \"commands\": [\n \"echo \\\"Downloading scripts from s3://${SCRIPT_S3_BUCKET}/${SCRIPT_S3_KEY}\\\"\",\n \"aws s3 cp s3://${SCRIPT_S3_BUCKET}/${SCRIPT_S3_KEY} /tmp\",\n \"mkdir -p /tmp/scriptdir\",\n \"unzip /tmp/$(basename $SCRIPT_S3_KEY) -d /tmp/scriptdir\"\n ]\n },\n \"build\": {\n \"commands\": [\n \"export SCRIPT_DIR=/tmp/scriptdir\",\n \"echo \\\"Running publish.sh\\\"\",\n \"/bin/bash /tmp/scriptdir/publish.sh\"\n ]\n }\n }\n}",
|
|
6182
6268
|
"Type": "NO_SOURCE"
|
|
6183
6269
|
},
|
|
6270
|
+
"Cache": {
|
|
6271
|
+
"Type": "NO_CACHE"
|
|
6272
|
+
},
|
|
6184
6273
|
"EncryptionKey": {
|
|
6185
6274
|
"Fn::GetAtt": [
|
|
6186
6275
|
"CodeCommitPipelineBuildPipelineArtifactsBucketEncryptionKey05A62A83",
|
|
@@ -6366,6 +6455,9 @@
|
|
|
6366
6455
|
"ReportBuildStatus": false,
|
|
6367
6456
|
"Type": "GITHUB"
|
|
6368
6457
|
},
|
|
6458
|
+
"Cache": {
|
|
6459
|
+
"Type": "NO_CACHE"
|
|
6460
|
+
},
|
|
6369
6461
|
"EncryptionKey": "alias/aws/s3",
|
|
6370
6462
|
"Triggers": {
|
|
6371
6463
|
"Webhook": false
|
|
@@ -6530,6 +6622,10 @@
|
|
|
6530
6622
|
"Type": "GITHUB"
|
|
6531
6623
|
},
|
|
6532
6624
|
"BadgeEnabled": true,
|
|
6625
|
+
"Cache": {
|
|
6626
|
+
"Type": "NO_CACHE"
|
|
6627
|
+
},
|
|
6628
|
+
"Description": "Automatic PR build for awslabs/aws-delivlib-sample",
|
|
6533
6629
|
"EncryptionKey": "alias/aws/s3",
|
|
6534
6630
|
"Triggers": {
|
|
6535
6631
|
"FilterGroups": [
|
|
@@ -6760,7 +6856,7 @@
|
|
|
6760
6856
|
"Properties": {
|
|
6761
6857
|
"Code": {
|
|
6762
6858
|
"S3Bucket": "cdk-hnb659fds-assets-712950704752-us-east-1",
|
|
6763
|
-
"S3Key": "
|
|
6859
|
+
"S3Key": "6d84cdad0db1b0ef3c0db08c3e9ceb1ca56b3f8ffc4e1e1fd23f9a51b052e8fd.zip"
|
|
6764
6860
|
},
|
|
6765
6861
|
"Role": {
|
|
6766
6862
|
"Fn::GetAtt": [
|
|
@@ -7564,7 +7660,7 @@
|
|
|
7564
7660
|
"Properties": {
|
|
7565
7661
|
"Description": "AWS CloudFormation handler for \"Custom::S3BucketNotifications\" resources (@aws-cdk/aws-s3)",
|
|
7566
7662
|
"Code": {
|
|
7567
|
-
"ZipFile": "import boto3 # type: ignore\nimport json\nimport logging\nimport urllib.request\n\ns3 = boto3.client(\"s3\")\n\nCONFIGURATION_TYPES = [\"TopicConfigurations\", \"QueueConfigurations\", \"LambdaFunctionConfigurations\"]\n\ndef handler(event: dict, context):\n response_status = \"SUCCESS\"\n error_message = \"\"\n try:\n props = event[\"ResourceProperties\"]\n bucket = props[\"BucketName\"]\n notification_configuration = props[\"NotificationConfiguration\"]\n request_type = event[\"RequestType\"]\n managed = props.get('Managed', 'true').lower() == 'true'\n stack_id = event['StackId']\n\n if managed:\n config = handle_managed(request_type, notification_configuration)\n else:\n config = handle_unmanaged(bucket, stack_id, request_type, notification_configuration)\n\n put_bucket_notification_configuration(bucket, config)\n except Exception as e:\n logging.exception(\"Failed to put bucket notification configuration\")\n response_status = \"FAILED\"\n error_message = f\"Error: {str(e)}. \"\n finally:\n submit_response(event, context, response_status, error_message)\n\n\ndef handle_managed(request_type, notification_configuration):\n if request_type == 'Delete':\n return {}\n return notification_configuration\n\n\ndef handle_unmanaged(bucket, stack_id, request_type, notification_configuration):\n\n # find external notifications\n external_notifications = find_external_notifications(bucket, stack_id)\n\n # if delete, that's all we need\n if request_type == 'Delete':\n return external_notifications\n\n def with_id(notification):\n notification['Id'] = f\"{stack_id}-{hash(json.dumps(notification, sort_keys=True))}\"\n return notification\n\n # otherwise, merge external with incoming config and augment with id\n notifications = {}\n for t in CONFIGURATION_TYPES:\n external = external_notifications.get(t, [])\n incoming = [with_id(n) for n in notification_configuration.get(t, [])]\n notifications[t] = external + incoming\n return notifications\n\n\ndef find_external_notifications(bucket, stack_id):\n existing_notifications = get_bucket_notification_configuration(bucket)\n external_notifications = {}\n for t in CONFIGURATION_TYPES:\n # if the notification was created by us, we know what id to expect\n # so we can filter by it.\n external_notifications[t] = [n for n in existing_notifications.get(t, []) if not n['Id'].startswith(f\"{stack_id}-\")]\n\n return external_notifications\n\n\ndef get_bucket_notification_configuration(bucket):\n return s3.get_bucket_notification_configuration(Bucket=bucket)\n\n\ndef put_bucket_notification_configuration(bucket, notification_configuration):\n s3.put_bucket_notification_configuration(Bucket=bucket, NotificationConfiguration=notification_configuration)\n\n\ndef submit_response(event: dict, context, response_status: str, error_message: str):\n response_body = json.dumps(\n {\n \"Status\": response_status,\n \"Reason\": f\"{error_message}See the details in CloudWatch Log Stream: {context.log_stream_name}\",\n \"PhysicalResourceId\": event.get(\"PhysicalResourceId\") or event[\"LogicalResourceId\"],\n \"StackId\": event[\"StackId\"],\n \"RequestId\": event[\"RequestId\"],\n \"LogicalResourceId\": event[\"LogicalResourceId\"],\n \"NoEcho\": False,\n }\n ).encode(\"utf-8\")\n headers = {\"content-type\": \"\", \"content-length\": str(len(response_body))}\n try:\n req = urllib.request.Request(url=event[\"ResponseURL\"], headers=headers, data=response_body, method=\"PUT\")\n with urllib.request.urlopen(req) as response:\n print(response.read().decode(\"utf-8\"))\n print(\"Status code: \" + response.reason)\n except Exception as e:\n print(\"send(..) failed executing request.urlopen(..): \" + str(e))\n"
|
|
7663
|
+
"ZipFile": "import boto3 # type: ignore\nimport json\nimport logging\nimport urllib.request\n\ns3 = boto3.client(\"s3\")\n\nEVENTBRIDGE_CONFIGURATION = 'EventBridgeConfiguration'\n\nCONFIGURATION_TYPES = [\"TopicConfigurations\", \"QueueConfigurations\", \"LambdaFunctionConfigurations\"]\n\ndef handler(event: dict, context):\n response_status = \"SUCCESS\"\n error_message = \"\"\n try:\n props = event[\"ResourceProperties\"]\n bucket = props[\"BucketName\"]\n notification_configuration = props[\"NotificationConfiguration\"]\n request_type = event[\"RequestType\"]\n managed = props.get('Managed', 'true').lower() == 'true'\n stack_id = event['StackId']\n\n if managed:\n config = handle_managed(request_type, notification_configuration)\n else:\n config = handle_unmanaged(bucket, stack_id, request_type, notification_configuration)\n\n put_bucket_notification_configuration(bucket, config)\n except Exception as e:\n logging.exception(\"Failed to put bucket notification configuration\")\n response_status = \"FAILED\"\n error_message = f\"Error: {str(e)}. \"\n finally:\n submit_response(event, context, response_status, error_message)\n\n\ndef handle_managed(request_type, notification_configuration):\n if request_type == 'Delete':\n return {}\n return notification_configuration\n\n\ndef handle_unmanaged(bucket, stack_id, request_type, notification_configuration):\n\n # find external notifications\n external_notifications = find_external_notifications(bucket, stack_id)\n\n # if delete, that's all we need\n if request_type == 'Delete':\n return external_notifications\n\n def with_id(notification):\n notification['Id'] = f\"{stack_id}-{hash(json.dumps(notification, sort_keys=True))}\"\n return notification\n\n # otherwise, merge external with incoming config and augment with id\n notifications = {}\n for t in CONFIGURATION_TYPES:\n external = external_notifications.get(t, [])\n incoming = [with_id(n) for n in notification_configuration.get(t, [])]\n notifications[t] = external + incoming\n\n # EventBridge configuration is a special case because it's just an empty object if it exists\n if EVENTBRIDGE_CONFIGURATION in notification_configuration:\n notifications[EVENTBRIDGE_CONFIGURATION] = notification_configuration[EVENTBRIDGE_CONFIGURATION]\n elif EVENTBRIDGE_CONFIGURATION in external_notifications:\n notifications[EVENTBRIDGE_CONFIGURATION] = external_notifications[EVENTBRIDGE_CONFIGURATION]\n\n return notifications\n\n\ndef find_external_notifications(bucket, stack_id):\n existing_notifications = get_bucket_notification_configuration(bucket)\n external_notifications = {}\n for t in CONFIGURATION_TYPES:\n # if the notification was created by us, we know what id to expect\n # so we can filter by it.\n external_notifications[t] = [n for n in existing_notifications.get(t, []) if not n['Id'].startswith(f\"{stack_id}-\")]\n\n # always treat EventBridge configuration as an external config if it already exists\n # as there is no way to determine whether it's managed by us or not\n if EVENTBRIDGE_CONFIGURATION in existing_notifications:\n external_notifications[EVENTBRIDGE_CONFIGURATION] = existing_notifications[EVENTBRIDGE_CONFIGURATION]\n\n return external_notifications\n\n\ndef get_bucket_notification_configuration(bucket):\n return s3.get_bucket_notification_configuration(Bucket=bucket)\n\n\ndef put_bucket_notification_configuration(bucket, notification_configuration):\n s3.put_bucket_notification_configuration(Bucket=bucket, NotificationConfiguration=notification_configuration)\n\n\ndef submit_response(event: dict, context, response_status: str, error_message: str):\n response_body = json.dumps(\n {\n \"Status\": response_status,\n \"Reason\": f\"{error_message}See the details in CloudWatch Log Stream: {context.log_stream_name}\",\n \"PhysicalResourceId\": event.get(\"PhysicalResourceId\") or event[\"LogicalResourceId\"],\n \"StackId\": event[\"StackId\"],\n \"RequestId\": event[\"RequestId\"],\n \"LogicalResourceId\": event[\"LogicalResourceId\"],\n \"NoEcho\": False,\n }\n ).encode(\"utf-8\")\n headers = {\"content-type\": \"\", \"content-length\": str(len(response_body))}\n try:\n req = urllib.request.Request(url=event[\"ResponseURL\"], headers=headers, data=response_body, method=\"PUT\")\n with urllib.request.urlopen(req) as response:\n print(response.read().decode(\"utf-8\"))\n print(\"Status code: \" + response.reason)\n except Exception as e:\n print(\"send(..) failed executing request.urlopen(..): \" + str(e))\n"
|
|
7568
7664
|
},
|
|
7569
7665
|
"Handler": "index.handler",
|
|
7570
7666
|
"Role": {
|