cdk-ecr-deployment 2.2.0 → 2.3.2
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/.jsii +44 -24
- package/API.md +2 -0
- package/README.md +6 -5
- package/changelog.md +3 -3
- package/lambda/Dockerfile +2 -2
- package/lambda/go.mod +19 -2
- package/lambda/go.sum +189 -27
- package/lambda/install.js +5 -3
- package/lib/index.d.ts +11 -0
- package/lib/index.js +12 -8
- package/node_modules/hpagent/.github/dependabot.yml +8 -0
- package/node_modules/hpagent/.github/workflows/build.yml +29 -0
- package/node_modules/hpagent/LICENSE +21 -0
- package/node_modules/hpagent/README.md +138 -0
- package/node_modules/hpagent/index.d.ts +26 -0
- package/node_modules/hpagent/index.js +101 -0
- package/node_modules/hpagent/index.mjs +5 -0
- package/node_modules/hpagent/package.json +49 -0
- package/node_modules/hpagent/test/got.test.js +111 -0
- package/node_modules/hpagent/test/http-http.test.js +351 -0
- package/node_modules/hpagent/test/http-https.test.js +313 -0
- package/node_modules/hpagent/test/https-http.test.js +313 -0
- package/node_modules/hpagent/test/https-https.test.js +313 -0
- package/node_modules/hpagent/test/index.test-d.ts +45 -0
- package/node_modules/hpagent/test/needle.test.js +103 -0
- package/node_modules/hpagent/test/node-fetch.test.js +103 -0
- package/node_modules/hpagent/test/simple-get.test.js +139 -0
- package/node_modules/hpagent/test/ssl.cert +19 -0
- package/node_modules/hpagent/test/ssl.key +27 -0
- package/node_modules/hpagent/test/utils.js +59 -0
- package/package.json +5 -3
- package/releasetag.txt +1 -1
- package/version.txt +1 -1
package/.jsii
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
]
|
|
7
7
|
},
|
|
8
8
|
"bundled": {
|
|
9
|
-
"got": "^11.8.3"
|
|
9
|
+
"got": "^11.8.3",
|
|
10
|
+
"hpagent": "^0.1.2"
|
|
10
11
|
},
|
|
11
12
|
"dependencies": {
|
|
12
13
|
"aws-cdk-lib": "^2.0.0",
|
|
@@ -2871,7 +2872,7 @@
|
|
|
2871
2872
|
},
|
|
2872
2873
|
"name": "cdk-ecr-deployment",
|
|
2873
2874
|
"readme": {
|
|
2874
|
-
"markdown": "# cdk-ecr-deployment\n\n[](https://github.com/wchaws/cdk-ecr-deployment/actions/workflows/release.yml)\n[](https://www.npmjs.com/package/cdk-ecr-deployment)\n[](https://pypi.org/project/cdk-ecr-deployment)\n[](https://www.npmjs.com/package/cdk-ecr-deployment)\n[](https://pypi.org/project/cdk-ecr-deployment)\n\nCDK construct to
|
|
2875
|
+
"markdown": "# cdk-ecr-deployment\n\n[](https://github.com/wchaws/cdk-ecr-deployment/actions/workflows/release.yml)\n[](https://www.npmjs.com/package/cdk-ecr-deployment)\n[](https://pypi.org/project/cdk-ecr-deployment)\n[](https://www.npmjs.com/package/cdk-ecr-deployment)\n[](https://pypi.org/project/cdk-ecr-deployment)\n\nCDK construct to synchronize single docker image between docker registries.\n\n⚠️ Please use ^1.0.0 for cdk version 1.x.x, use ^2.0.0 for cdk version 2.x.x\n\n## Features\n\n- Copy image from ECR/external registry to (another) ECR/external registry\n- Copy an archive tarball image from s3 to ECR/external registry\n\n⚠️ Currently construct can authenticate to external registry only with basic auth, but credentials are put as plain text to template and logs. See issue [#171](https://github.com/cdklabs/cdk-ecr-deployment/issues/171).\n\n## Examples\n\nRun [test/integ.ecr-deployment.ts](./test/integ.ecr-deployment.ts)\n\n```shell\nNO_PREBUILT_LAMBDA=1 npx cdk deploy -a \"npx ts-node -P tsconfig.dev.json --prefer-ts-exts test/integ.ecr-deployment.ts\"\n```\n\n## Tech Details & Contribution\n\nThe core of this project relies on [containers/image](https://github.com/containers/image) which is used by [Skopeo](https://github.com/containers/skopeo).\nPlease take a look at those projects before contribution.\n\nTo support a new docker image source(like docker tarball in s3), you need to implement [image transport interface](https://github.com/containers/image/blob/master/types/types.go). You could take a look at [docker-archive](https://github.com/containers/image/blob/ccb87a8d0f45cf28846e307eb0ec2b9d38a458c2/docker/archive/transport.go) transport for a good start.\n\nTo test the `lambda` folder, `make test`.\n"
|
|
2875
2876
|
},
|
|
2876
2877
|
"repository": {
|
|
2877
2878
|
"type": "git",
|
|
@@ -2900,7 +2901,7 @@
|
|
|
2900
2901
|
},
|
|
2901
2902
|
"locationInModule": {
|
|
2902
2903
|
"filename": "src/index.ts",
|
|
2903
|
-
"line":
|
|
2904
|
+
"line": 111
|
|
2904
2905
|
},
|
|
2905
2906
|
"parameters": [
|
|
2906
2907
|
{
|
|
@@ -2924,7 +2925,7 @@
|
|
|
2924
2925
|
"kind": "class",
|
|
2925
2926
|
"locationInModule": {
|
|
2926
2927
|
"filename": "src/index.ts",
|
|
2927
|
-
"line":
|
|
2928
|
+
"line": 110
|
|
2928
2929
|
},
|
|
2929
2930
|
"name": "DockerImageName",
|
|
2930
2931
|
"properties": [
|
|
@@ -2937,7 +2938,7 @@
|
|
|
2937
2938
|
"immutable": true,
|
|
2938
2939
|
"locationInModule": {
|
|
2939
2940
|
"filename": "src/index.ts",
|
|
2940
|
-
"line":
|
|
2941
|
+
"line": 112
|
|
2941
2942
|
},
|
|
2942
2943
|
"name": "uri",
|
|
2943
2944
|
"overrides": "cdk-ecr-deployment.IImageName",
|
|
@@ -2951,7 +2952,7 @@
|
|
|
2951
2952
|
},
|
|
2952
2953
|
"locationInModule": {
|
|
2953
2954
|
"filename": "src/index.ts",
|
|
2954
|
-
"line":
|
|
2955
|
+
"line": 111
|
|
2955
2956
|
},
|
|
2956
2957
|
"name": "creds",
|
|
2957
2958
|
"optional": true,
|
|
@@ -2976,7 +2977,7 @@
|
|
|
2976
2977
|
},
|
|
2977
2978
|
"locationInModule": {
|
|
2978
2979
|
"filename": "src/index.ts",
|
|
2979
|
-
"line":
|
|
2980
|
+
"line": 127
|
|
2980
2981
|
},
|
|
2981
2982
|
"parameters": [
|
|
2982
2983
|
{
|
|
@@ -3002,7 +3003,7 @@
|
|
|
3002
3003
|
"kind": "class",
|
|
3003
3004
|
"locationInModule": {
|
|
3004
3005
|
"filename": "src/index.ts",
|
|
3005
|
-
"line":
|
|
3006
|
+
"line": 126
|
|
3006
3007
|
},
|
|
3007
3008
|
"name": "ECRDeployment",
|
|
3008
3009
|
"symbolId": "src/index:ECRDeployment"
|
|
@@ -3030,7 +3031,7 @@
|
|
|
3030
3031
|
"immutable": true,
|
|
3031
3032
|
"locationInModule": {
|
|
3032
3033
|
"filename": "src/index.ts",
|
|
3033
|
-
"line":
|
|
3034
|
+
"line": 30
|
|
3034
3035
|
},
|
|
3035
3036
|
"name": "dest",
|
|
3036
3037
|
"type": {
|
|
@@ -3046,13 +3047,32 @@
|
|
|
3046
3047
|
"immutable": true,
|
|
3047
3048
|
"locationInModule": {
|
|
3048
3049
|
"filename": "src/index.ts",
|
|
3049
|
-
"line":
|
|
3050
|
+
"line": 25
|
|
3050
3051
|
},
|
|
3051
3052
|
"name": "src",
|
|
3052
3053
|
"type": {
|
|
3053
3054
|
"fqn": "cdk-ecr-deployment.IImageName"
|
|
3054
3055
|
}
|
|
3055
3056
|
},
|
|
3057
|
+
{
|
|
3058
|
+
"abstract": true,
|
|
3059
|
+
"docs": {
|
|
3060
|
+
"default": "public.ecr.aws/sam/build-go1.x:latest",
|
|
3061
|
+
"remarks": "Might be needed for local build if all images need to come from own registry.\n\nNote that image should use yum as a package manager and have golang available.",
|
|
3062
|
+
"stability": "stable",
|
|
3063
|
+
"summary": "Image to use to build Golang lambda for custom resource, if download fails or is not wanted."
|
|
3064
|
+
},
|
|
3065
|
+
"immutable": true,
|
|
3066
|
+
"locationInModule": {
|
|
3067
|
+
"filename": "src/index.ts",
|
|
3068
|
+
"line": 21
|
|
3069
|
+
},
|
|
3070
|
+
"name": "buildImage",
|
|
3071
|
+
"optional": true,
|
|
3072
|
+
"type": {
|
|
3073
|
+
"primitive": "string"
|
|
3074
|
+
}
|
|
3075
|
+
},
|
|
3056
3076
|
{
|
|
3057
3077
|
"abstract": true,
|
|
3058
3078
|
"docs": {
|
|
@@ -3062,7 +3082,7 @@
|
|
|
3062
3082
|
"immutable": true,
|
|
3063
3083
|
"locationInModule": {
|
|
3064
3084
|
"filename": "src/index.ts",
|
|
3065
|
-
"line":
|
|
3085
|
+
"line": 68
|
|
3066
3086
|
},
|
|
3067
3087
|
"name": "environment",
|
|
3068
3088
|
"optional": true,
|
|
@@ -3086,7 +3106,7 @@
|
|
|
3086
3106
|
"immutable": true,
|
|
3087
3107
|
"locationInModule": {
|
|
3088
3108
|
"filename": "src/index.ts",
|
|
3089
|
-
"line":
|
|
3109
|
+
"line": 41
|
|
3090
3110
|
},
|
|
3091
3111
|
"name": "memoryLimit",
|
|
3092
3112
|
"optional": true,
|
|
@@ -3104,7 +3124,7 @@
|
|
|
3104
3124
|
"immutable": true,
|
|
3105
3125
|
"locationInModule": {
|
|
3106
3126
|
"filename": "src/index.ts",
|
|
3107
|
-
"line":
|
|
3127
|
+
"line": 48
|
|
3108
3128
|
},
|
|
3109
3129
|
"name": "role",
|
|
3110
3130
|
"optional": true,
|
|
@@ -3122,7 +3142,7 @@
|
|
|
3122
3142
|
"immutable": true,
|
|
3123
3143
|
"locationInModule": {
|
|
3124
3144
|
"filename": "src/index.ts",
|
|
3125
|
-
"line":
|
|
3145
|
+
"line": 55
|
|
3126
3146
|
},
|
|
3127
3147
|
"name": "vpc",
|
|
3128
3148
|
"optional": true,
|
|
@@ -3141,7 +3161,7 @@
|
|
|
3141
3161
|
"immutable": true,
|
|
3142
3162
|
"locationInModule": {
|
|
3143
3163
|
"filename": "src/index.ts",
|
|
3144
|
-
"line":
|
|
3164
|
+
"line": 63
|
|
3145
3165
|
},
|
|
3146
3166
|
"name": "vpcSubnets",
|
|
3147
3167
|
"optional": true,
|
|
@@ -3161,7 +3181,7 @@
|
|
|
3161
3181
|
"kind": "interface",
|
|
3162
3182
|
"locationInModule": {
|
|
3163
3183
|
"filename": "src/index.ts",
|
|
3164
|
-
"line":
|
|
3184
|
+
"line": 71
|
|
3165
3185
|
},
|
|
3166
3186
|
"name": "IImageName",
|
|
3167
3187
|
"properties": [
|
|
@@ -3175,7 +3195,7 @@
|
|
|
3175
3195
|
"immutable": true,
|
|
3176
3196
|
"locationInModule": {
|
|
3177
3197
|
"filename": "src/index.ts",
|
|
3178
|
-
"line":
|
|
3198
|
+
"line": 77
|
|
3179
3199
|
},
|
|
3180
3200
|
"name": "uri",
|
|
3181
3201
|
"type": {
|
|
@@ -3191,7 +3211,7 @@
|
|
|
3191
3211
|
},
|
|
3192
3212
|
"locationInModule": {
|
|
3193
3213
|
"filename": "src/index.ts",
|
|
3194
|
-
"line":
|
|
3214
|
+
"line": 82
|
|
3195
3215
|
},
|
|
3196
3216
|
"name": "creds",
|
|
3197
3217
|
"optional": true,
|
|
@@ -3214,7 +3234,7 @@
|
|
|
3214
3234
|
},
|
|
3215
3235
|
"locationInModule": {
|
|
3216
3236
|
"filename": "src/index.ts",
|
|
3217
|
-
"line":
|
|
3237
|
+
"line": 117
|
|
3218
3238
|
},
|
|
3219
3239
|
"parameters": [
|
|
3220
3240
|
{
|
|
@@ -3245,7 +3265,7 @@
|
|
|
3245
3265
|
"kind": "class",
|
|
3246
3266
|
"locationInModule": {
|
|
3247
3267
|
"filename": "src/index.ts",
|
|
3248
|
-
"line":
|
|
3268
|
+
"line": 115
|
|
3249
3269
|
},
|
|
3250
3270
|
"name": "S3ArchiveName",
|
|
3251
3271
|
"properties": [
|
|
@@ -3258,7 +3278,7 @@
|
|
|
3258
3278
|
"immutable": true,
|
|
3259
3279
|
"locationInModule": {
|
|
3260
3280
|
"filename": "src/index.ts",
|
|
3261
|
-
"line":
|
|
3281
|
+
"line": 123
|
|
3262
3282
|
},
|
|
3263
3283
|
"name": "uri",
|
|
3264
3284
|
"overrides": "cdk-ecr-deployment.IImageName",
|
|
@@ -3272,7 +3292,7 @@
|
|
|
3272
3292
|
},
|
|
3273
3293
|
"locationInModule": {
|
|
3274
3294
|
"filename": "src/index.ts",
|
|
3275
|
-
"line":
|
|
3295
|
+
"line": 117
|
|
3276
3296
|
},
|
|
3277
3297
|
"name": "creds",
|
|
3278
3298
|
"optional": true,
|
|
@@ -3285,6 +3305,6 @@
|
|
|
3285
3305
|
"symbolId": "src/index:S3ArchiveName"
|
|
3286
3306
|
}
|
|
3287
3307
|
},
|
|
3288
|
-
"version": "2.2
|
|
3289
|
-
"fingerprint": "
|
|
3308
|
+
"version": "2.3.2",
|
|
3309
|
+
"fingerprint": "hAHkaiu8Tgy62syHIJpKSnmk2rvi4QVaY7S9rpIag24="
|
|
3290
3310
|
}
|
package/API.md
CHANGED
|
@@ -75,6 +75,7 @@ new ECRDeployment(scope: Construct, id: string, props: ECRDeploymentProps)
|
|
|
75
75
|
* **props** (<code>[ECRDeploymentProps](#cdk-ecr-deployment-ecrdeploymentprops)</code>) *No description*
|
|
76
76
|
* **dest** (<code>[IImageName](#cdk-ecr-deployment-iimagename)</code>) The destination of the docker image.
|
|
77
77
|
* **src** (<code>[IImageName](#cdk-ecr-deployment-iimagename)</code>) The source of the docker image.
|
|
78
|
+
* **buildImage** (<code>string</code>) Image to use to build Golang lambda for custom resource, if download fails or is not wanted. __*Default*__: public.ecr.aws/sam/build-go1.x:latest
|
|
78
79
|
* **environment** (<code>Map<string, string></code>) The environment variable to set. __*Optional*__
|
|
79
80
|
* **memoryLimit** (<code>number</code>) The amount of memory (in MiB) to allocate to the AWS Lambda function which replicates the files from the CDK bucket to the destination bucket. __*Default*__: 512
|
|
80
81
|
* **role** (<code>[aws_iam.IRole](#aws-cdk-lib-aws-iam-irole)</code>) Execution role associated with this function. __*Default*__: A role is automatically created
|
|
@@ -126,6 +127,7 @@ Name | Type | Description
|
|
|
126
127
|
-----|------|-------------
|
|
127
128
|
**dest** | <code>[IImageName](#cdk-ecr-deployment-iimagename)</code> | The destination of the docker image.
|
|
128
129
|
**src** | <code>[IImageName](#cdk-ecr-deployment-iimagename)</code> | The source of the docker image.
|
|
130
|
+
**buildImage**? | <code>string</code> | Image to use to build Golang lambda for custom resource, if download fails or is not wanted.<br/>__*Default*__: public.ecr.aws/sam/build-go1.x:latest
|
|
129
131
|
**environment**? | <code>Map<string, string></code> | The environment variable to set.<br/>__*Optional*__
|
|
130
132
|
**memoryLimit**? | <code>number</code> | The amount of memory (in MiB) to allocate to the AWS Lambda function which replicates the files from the CDK bucket to the destination bucket.<br/>__*Default*__: 512
|
|
131
133
|
**role**? | <code>[aws_iam.IRole](#aws-cdk-lib-aws-iam-irole)</code> | Execution role associated with this function.<br/>__*Default*__: A role is automatically created
|
package/README.md
CHANGED
|
@@ -6,15 +6,16 @@
|
|
|
6
6
|
[](https://www.npmjs.com/package/cdk-ecr-deployment)
|
|
7
7
|
[](https://pypi.org/project/cdk-ecr-deployment)
|
|
8
8
|
|
|
9
|
-
CDK construct to
|
|
9
|
+
CDK construct to synchronize single docker image between docker registries.
|
|
10
10
|
|
|
11
11
|
⚠️ Please use ^1.0.0 for cdk version 1.x.x, use ^2.0.0 for cdk version 2.x.x
|
|
12
12
|
|
|
13
13
|
## Features
|
|
14
14
|
|
|
15
|
-
- Copy
|
|
16
|
-
- Copy
|
|
17
|
-
|
|
15
|
+
- Copy image from ECR/external registry to (another) ECR/external registry
|
|
16
|
+
- Copy an archive tarball image from s3 to ECR/external registry
|
|
17
|
+
|
|
18
|
+
⚠️ Currently construct can authenticate to external registry only with basic auth, but credentials are put as plain text to template and logs. See issue [#171](https://github.com/cdklabs/cdk-ecr-deployment/issues/171).
|
|
18
19
|
|
|
19
20
|
## Examples
|
|
20
21
|
|
|
@@ -26,7 +27,7 @@ NO_PREBUILT_LAMBDA=1 npx cdk deploy -a "npx ts-node -P tsconfig.dev.json --prefe
|
|
|
26
27
|
|
|
27
28
|
## Tech Details & Contribution
|
|
28
29
|
|
|
29
|
-
The core of this project relies on https://github.com/containers/image which is used by https://github.com/containers/skopeo.
|
|
30
|
+
The core of this project relies on [containers/image](https://github.com/containers/image) which is used by [Skopeo](https://github.com/containers/skopeo).
|
|
30
31
|
Please take a look at those projects before contribution.
|
|
31
32
|
|
|
32
33
|
To support a new docker image source(like docker tarball in s3), you need to implement [image transport interface](https://github.com/containers/image/blob/master/types/types.go). You could take a look at [docker-archive](https://github.com/containers/image/blob/ccb87a8d0f45cf28846e307eb0ec2b9d38a458c2/docker/archive/transport.go) transport for a good start.
|
package/changelog.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
### [2.3.2](https://github.com/cdklabs/cdk-ecr-deployment/compare/v2.3.1...v2.3.2) (2022-03-05)
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### Bug Fixes
|
|
6
6
|
|
|
7
|
-
*
|
|
7
|
+
* update github.com/containerd/containerd to 1.5.9 ([346a651](https://github.com/cdklabs/cdk-ecr-deployment/commit/346a6516e5c294bbb133f3dfb3ef5d96bf8da087))
|
package/lambda/Dockerfile
CHANGED
package/lambda/go.mod
CHANGED
|
@@ -3,20 +3,37 @@ module cdk-ecr-deployment-handler
|
|
|
3
3
|
go 1.15
|
|
4
4
|
|
|
5
5
|
require (
|
|
6
|
+
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
|
|
7
|
+
github.com/Microsoft/go-winio v0.5.1 // indirect
|
|
8
|
+
github.com/Microsoft/hcsshim v0.9.2 // indirect
|
|
6
9
|
github.com/aws/aws-lambda-go v1.23.0
|
|
7
10
|
github.com/aws/aws-sdk-go-v2 v1.3.2
|
|
8
11
|
github.com/aws/aws-sdk-go-v2/config v1.1.6
|
|
9
12
|
github.com/aws/aws-sdk-go-v2/service/ecr v1.2.2
|
|
10
13
|
github.com/aws/aws-sdk-go-v2/service/s3 v1.5.0
|
|
11
|
-
github.com/
|
|
14
|
+
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
|
15
|
+
github.com/containerd/cgroups v1.0.3 // indirect
|
|
16
|
+
github.com/containerd/containerd v1.5.10 // indirect
|
|
12
17
|
github.com/containers/image/v5 v5.17.0
|
|
13
18
|
github.com/docker/distribution v2.8.0+incompatible // indirect
|
|
14
19
|
github.com/docker/docker v20.10.12+incompatible // indirect
|
|
15
20
|
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
|
|
21
|
+
github.com/hashicorp/errwrap v1.1.0 // indirect
|
|
22
|
+
github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 // indirect
|
|
16
23
|
github.com/opencontainers/go-digest v1.0.0
|
|
17
24
|
github.com/opencontainers/image-spec v1.0.3-0.20211202193544-a5463b7f9c84 // indirect
|
|
18
|
-
github.com/opencontainers/runc v1.0
|
|
25
|
+
github.com/opencontainers/runc v1.1.0 // indirect
|
|
19
26
|
github.com/pkg/errors v0.9.1
|
|
27
|
+
github.com/prometheus/common v0.30.0 // indirect
|
|
28
|
+
github.com/prometheus/procfs v0.7.3 // indirect
|
|
20
29
|
github.com/sirupsen/logrus v1.8.1
|
|
21
30
|
github.com/stretchr/testify v1.7.0
|
|
31
|
+
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
|
|
32
|
+
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f // indirect
|
|
33
|
+
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
|
|
34
|
+
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
|
|
35
|
+
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
|
|
36
|
+
google.golang.org/grpc v1.43.0 // indirect
|
|
37
|
+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
|
38
|
+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
|
|
22
39
|
)
|