@onivoro/onix 20.0.20 → 20.0.22
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/package.json +1 -1
- package/src/functions/push-image-to-ecr-wrapped.function.js +1 -1
- package/src/functions/push-image-to-ecr-wrapped.function.js.map +1 -1
- package/src/functions/push-image-to-ecr.function.d.ts +2 -3
- package/src/functions/push-image-to-ecr.function.js +2 -6
- package/src/functions/push-image-to-ecr.function.js.map +1 -1
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@ function pushImageToECRWrapped(_) {
|
|
|
8
8
|
const { ecr, profile } = _;
|
|
9
9
|
const [registryId, region, repoColonTag] = ecr.replace('amazonaws.com', '').replace('dkr.ecr.', '').replace('/', '').split('.');
|
|
10
10
|
const [repositoryName, imageTag] = repoColonTag.split(':');
|
|
11
|
-
return yield (0, push_image_to_ecr_function_1.pushImageToECR)({ registryId, region,
|
|
11
|
+
return yield (0, push_image_to_ecr_function_1.pushImageToECR)({ registryId, region, ecr, profile });
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=push-image-to-ecr-wrapped.function.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push-image-to-ecr-wrapped.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/push-image-to-ecr-wrapped.function.ts"],"names":[],"mappings":";;AAEA,sDAMC;;AARD,6EAA8D;AAE9D,SAAsB,qBAAqB,CAAC,CAAmC;;QAC7E,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAC3B,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAChI,MAAM,CAAC,cAAc,EAAE,QAAQ,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAE3D,OAAO,MAAM,IAAA,2CAAc,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"push-image-to-ecr-wrapped.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/push-image-to-ecr-wrapped.function.ts"],"names":[],"mappings":";;AAEA,sDAMC;;AARD,6EAA8D;AAE9D,SAAsB,qBAAqB,CAAC,CAAmC;;QAC7E,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;QAC3B,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAChI,MAAM,CAAC,cAAc,EAAE,QAAQ,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAE3D,OAAO,MAAM,IAAA,2CAAc,EAAC,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;CAAA"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export interface PushImageConfig {
|
|
2
2
|
region: string;
|
|
3
|
-
|
|
4
|
-
imageTag: string;
|
|
3
|
+
ecr: string;
|
|
5
4
|
registryId: string;
|
|
6
5
|
profile: string;
|
|
7
6
|
}
|
|
8
|
-
export declare function pushImageToECR({ region,
|
|
7
|
+
export declare function pushImageToECR({ region, ecr, registryId, profile }: PushImageConfig): Promise<void>;
|
|
@@ -6,7 +6,7 @@ const client_ecr_1 = require("@aws-sdk/client-ecr");
|
|
|
6
6
|
const credential_providers_1 = require("@aws-sdk/credential-providers");
|
|
7
7
|
const child_process_1 = require("child_process");
|
|
8
8
|
function pushImageToECR(_a) {
|
|
9
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ region,
|
|
9
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ region, ecr, registryId, profile }) {
|
|
10
10
|
var _b, _c;
|
|
11
11
|
try {
|
|
12
12
|
const config = { region, credentials: profile ? (0, credential_providers_1.fromIni)({ profile }) : undefined };
|
|
@@ -28,11 +28,7 @@ function pushImageToECR(_a) {
|
|
|
28
28
|
`-u ${username} ` +
|
|
29
29
|
`-p ${password} ` +
|
|
30
30
|
registryEndpoint, { stdio: 'inherit' });
|
|
31
|
-
|
|
32
|
-
const remoteImage = `${registryEndpoint.replace('https://', '')}/${repositoryName}:${imageTag}`;
|
|
33
|
-
(0, child_process_1.execSync)(`docker tag ${repositoryName}:${imageTag} ${remoteImage}`, { stdio: 'inherit' });
|
|
34
|
-
// Push image
|
|
35
|
-
(0, child_process_1.execSync)(`docker push ${remoteImage}`, { stdio: 'inherit' });
|
|
31
|
+
(0, child_process_1.execSync)(`docker push ${ecr}`, { stdio: 'inherit' });
|
|
36
32
|
console.log('Successfully pushed image to ECR');
|
|
37
33
|
}
|
|
38
34
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push-image-to-ecr.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/push-image-to-ecr.function.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"push-image-to-ecr.function.js","sourceRoot":"","sources":["../../../../onix/src/functions/push-image-to-ecr.function.ts"],"names":[],"mappings":";;AAWA,wCA4CC;;AAvDD,oDAA+F;AAC/F,wEAAwD;AACxD,iDAAyC;AASzC,SAAsB,cAAc;iEAAC,EACnC,MAAM,EACN,GAAG,EACH,UAAU,EACV,OAAO,EACS;;QAChB,IAAI,CAAC;YACH,MAAM,MAAM,GAAoB,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,IAAA,8BAAO,EA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