@catladder/cli 0.0.0-fix-cloud-run-ar-only-8f3ee0da → 0.0.0-fix-cloud-run-ar-only-efb4e634
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/dist/bundles/catenv/index.js +28 -15
- package/dist/bundles/cli/index.js +28 -15
- package/package.json +2 -2
|
@@ -39751,14 +39751,17 @@ var DOCKER_RUNNER_BUILD_VARIABLES = {
|
|
|
39751
39751
|
var getDockerImageVariables = function (context) {
|
|
39752
39752
|
return __assign(__assign({}, (0, deploy_1.isOfDeployType)(context.componentConfig.deploy, "google-cloudrun") ? {
|
|
39753
39753
|
DOCKER_REGISTRY: (0, artifactsRegistry_1.getArtifactsRegistryHost)(context),
|
|
39754
|
-
|
|
39755
|
-
|
|
39754
|
+
DOCKER_IMAGE: (0, artifactsRegistry_1.getArtifactsRegistryImageName)(context),
|
|
39755
|
+
DOCKER_CACHE_IMAGE: (0, artifactsRegistry_1.getArtifactsRegistryBuildCacheImage)(context)
|
|
39756
|
+
} :
|
|
39757
|
+
// gitlab registry:
|
|
39758
|
+
{
|
|
39756
39759
|
DOCKER_REGISTRY: "$CI_REGISTRY",
|
|
39757
|
-
|
|
39758
|
-
|
|
39759
|
-
DOCKER_CACHE_IMAGE: "$DOCKER_REGISTRY_IMAGE_PATH/caches/" + context.componentName,
|
|
39760
|
+
DOCKER_CACHE_IMAGE: "$CI_REGISTRY_IMAGE/caches/" + context.componentName,
|
|
39761
|
+
// ONLY USED IN KUBERNETES
|
|
39760
39762
|
DOCKER_IMAGE_NAME: context.environment.shortName + "/" + context.componentName,
|
|
39761
|
-
DOCKER_IMAGE: "$
|
|
39763
|
+
DOCKER_IMAGE: "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME"
|
|
39764
|
+
}), {
|
|
39762
39765
|
DOCKER_IMAGE_TAG: "$CI_COMMIT_SHA"
|
|
39763
39766
|
});
|
|
39764
39767
|
};
|
|
@@ -40920,7 +40923,7 @@ exports.readConfigSync = readConfigSync;
|
|
|
40920
40923
|
|
|
40921
40924
|
exports.__esModule = true;
|
|
40922
40925
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
40923
|
-
exports.PIPELINE_IMAGE_TAG = "fix-cloud-run-ar-only-
|
|
40926
|
+
exports.PIPELINE_IMAGE_TAG = "fix-cloud-run-ar-only-efb4e634" || 0;
|
|
40924
40927
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
|
|
40925
40928
|
|
|
40926
40929
|
/***/ }),
|
|
@@ -42484,7 +42487,7 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
|
42484
42487
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
42485
42488
|
};
|
|
42486
42489
|
exports.__esModule = true;
|
|
42487
|
-
exports.getDeleteUnusedImagesCommands = exports.getArtifactsRegistryImage = exports.getArtifactsRegistryImageName = exports.getArtifactsRegistryHost = void 0;
|
|
42490
|
+
exports.getDeleteUnusedImagesCommands = exports.getArtifactsRegistryImage = exports.getArtifactsRegistryBuildCacheImage = exports.getArtifactsRegistryImageName = exports.getArtifactsRegistryDockerUrl = exports.getArtifactsRegistryHost = void 0;
|
|
42488
42491
|
var gitlab_1 = __nccwpck_require__(4997);
|
|
42489
42492
|
var types_1 = __nccwpck_require__(3109);
|
|
42490
42493
|
var removeFirstLinesFromCommandOutput_1 = __nccwpck_require__(7547);
|
|
@@ -42497,6 +42500,16 @@ var getArtifactsRegistryHost = function (_a) {
|
|
|
42497
42500
|
return "".concat(deploy.region, "-docker.pkg.dev");
|
|
42498
42501
|
};
|
|
42499
42502
|
exports.getArtifactsRegistryHost = getArtifactsRegistryHost;
|
|
42503
|
+
var getArtifactsRegistryDockerUrl = function (context) {
|
|
42504
|
+
var deployConfig = context.componentConfig.deploy;
|
|
42505
|
+
if (!(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
|
|
42506
|
+
// should not happen
|
|
42507
|
+
throw new Error("deploy config is wrong");
|
|
42508
|
+
}
|
|
42509
|
+
var fullAppName = "".concat(context.fullConfig.customerName, "-").concat(context.fullConfig.appName);
|
|
42510
|
+
return "".concat((0, exports.getArtifactsRegistryHost)(context), "/").concat(deployConfig.projectId, "/catladder-deploy/").concat(fullAppName);
|
|
42511
|
+
};
|
|
42512
|
+
exports.getArtifactsRegistryDockerUrl = getArtifactsRegistryDockerUrl;
|
|
42500
42513
|
/**
|
|
42501
42514
|
*
|
|
42502
42515
|
* lecacyReviewImageName is only temporary. In old versions the images had no reviewslug in review apps, which makes cleanup harder. We delete all those images now, but need the path
|
|
@@ -42506,20 +42519,20 @@ var getArtifactsRegistryImageName = function (context, lecacyReviewImageName) {
|
|
|
42506
42519
|
if (lecacyReviewImageName === void 0) {
|
|
42507
42520
|
lecacyReviewImageName = false;
|
|
42508
42521
|
}
|
|
42509
|
-
var deployConfig = context.componentConfig.deploy;
|
|
42510
|
-
if (!(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
|
|
42511
|
-
// should not happen
|
|
42512
|
-
throw new Error("deploy config is wrong");
|
|
42513
|
-
}
|
|
42514
42522
|
if (lecacyReviewImageName && context.environment.envType !== "review") {
|
|
42515
42523
|
throw new Error("lecacyReviewImageName is only allowed for review app");
|
|
42516
42524
|
}
|
|
42517
|
-
var
|
|
42518
|
-
var dockerUrl = "".concat((0, exports.getArtifactsRegistryHost)(context), "/").concat(deployConfig.projectId, "/catladder-deploy/").concat(fullAppName);
|
|
42525
|
+
var dockerUrl = (0, exports.getArtifactsRegistryDockerUrl)(context);
|
|
42519
42526
|
var gcloudImagePath = __spreadArray([dockerUrl, context.environment.shortName, context.componentName], __read(context.environment.envType === "review" && !lecacyReviewImageName ? [(_a = context.commitInfo) === null || _a === void 0 ? void 0 : _a.reviewSlug] : []), false);
|
|
42520
42527
|
return gcloudImagePath.join("/");
|
|
42521
42528
|
};
|
|
42522
42529
|
exports.getArtifactsRegistryImageName = getArtifactsRegistryImageName;
|
|
42530
|
+
var getArtifactsRegistryBuildCacheImage = function (context) {
|
|
42531
|
+
var dockerUrl = (0, exports.getArtifactsRegistryDockerUrl)(context);
|
|
42532
|
+
var gcloudImagePath = [dockerUrl, "_caches_", context.componentName];
|
|
42533
|
+
return gcloudImagePath.join("/");
|
|
42534
|
+
};
|
|
42535
|
+
exports.getArtifactsRegistryBuildCacheImage = getArtifactsRegistryBuildCacheImage;
|
|
42523
42536
|
var getArtifactsRegistryImage = function (context) {
|
|
42524
42537
|
return "".concat((0, exports.getArtifactsRegistryImageName)(context), ":$DOCKER_IMAGE_TAG");
|
|
42525
42538
|
};
|
|
@@ -354290,14 +354290,17 @@ var DOCKER_RUNNER_BUILD_VARIABLES = {
|
|
|
354290
354290
|
var getDockerImageVariables = function (context) {
|
|
354291
354291
|
return __assign(__assign({}, (0, deploy_1.isOfDeployType)(context.componentConfig.deploy, "google-cloudrun") ? {
|
|
354292
354292
|
DOCKER_REGISTRY: (0, artifactsRegistry_1.getArtifactsRegistryHost)(context),
|
|
354293
|
-
|
|
354294
|
-
|
|
354293
|
+
DOCKER_IMAGE: (0, artifactsRegistry_1.getArtifactsRegistryImageName)(context),
|
|
354294
|
+
DOCKER_CACHE_IMAGE: (0, artifactsRegistry_1.getArtifactsRegistryBuildCacheImage)(context)
|
|
354295
|
+
} :
|
|
354296
|
+
// gitlab registry:
|
|
354297
|
+
{
|
|
354295
354298
|
DOCKER_REGISTRY: "$CI_REGISTRY",
|
|
354296
|
-
|
|
354297
|
-
|
|
354298
|
-
DOCKER_CACHE_IMAGE: "$DOCKER_REGISTRY_IMAGE_PATH/caches/" + context.componentName,
|
|
354299
|
+
DOCKER_CACHE_IMAGE: "$CI_REGISTRY_IMAGE/caches/" + context.componentName,
|
|
354300
|
+
// ONLY USED IN KUBERNETES
|
|
354299
354301
|
DOCKER_IMAGE_NAME: context.environment.shortName + "/" + context.componentName,
|
|
354300
|
-
DOCKER_IMAGE: "$
|
|
354302
|
+
DOCKER_IMAGE: "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME"
|
|
354303
|
+
}), {
|
|
354301
354304
|
DOCKER_IMAGE_TAG: "$CI_COMMIT_SHA"
|
|
354302
354305
|
});
|
|
354303
354306
|
};
|
|
@@ -355459,7 +355462,7 @@ exports.readConfigSync = readConfigSync;
|
|
|
355459
355462
|
|
|
355460
355463
|
exports.__esModule = true;
|
|
355461
355464
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
355462
|
-
exports.PIPELINE_IMAGE_TAG = "fix-cloud-run-ar-only-
|
|
355465
|
+
exports.PIPELINE_IMAGE_TAG = "fix-cloud-run-ar-only-efb4e634" || 0;
|
|
355463
355466
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
|
|
355464
355467
|
|
|
355465
355468
|
/***/ }),
|
|
@@ -357023,7 +357026,7 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
|
357023
357026
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
357024
357027
|
};
|
|
357025
357028
|
exports.__esModule = true;
|
|
357026
|
-
exports.getDeleteUnusedImagesCommands = exports.getArtifactsRegistryImage = exports.getArtifactsRegistryImageName = exports.getArtifactsRegistryHost = void 0;
|
|
357029
|
+
exports.getDeleteUnusedImagesCommands = exports.getArtifactsRegistryImage = exports.getArtifactsRegistryBuildCacheImage = exports.getArtifactsRegistryImageName = exports.getArtifactsRegistryDockerUrl = exports.getArtifactsRegistryHost = void 0;
|
|
357027
357030
|
var gitlab_1 = __nccwpck_require__(84997);
|
|
357028
357031
|
var types_1 = __nccwpck_require__(63109);
|
|
357029
357032
|
var removeFirstLinesFromCommandOutput_1 = __nccwpck_require__(77547);
|
|
@@ -357036,6 +357039,16 @@ var getArtifactsRegistryHost = function (_a) {
|
|
|
357036
357039
|
return "".concat(deploy.region, "-docker.pkg.dev");
|
|
357037
357040
|
};
|
|
357038
357041
|
exports.getArtifactsRegistryHost = getArtifactsRegistryHost;
|
|
357042
|
+
var getArtifactsRegistryDockerUrl = function (context) {
|
|
357043
|
+
var deployConfig = context.componentConfig.deploy;
|
|
357044
|
+
if (!(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
|
|
357045
|
+
// should not happen
|
|
357046
|
+
throw new Error("deploy config is wrong");
|
|
357047
|
+
}
|
|
357048
|
+
var fullAppName = "".concat(context.fullConfig.customerName, "-").concat(context.fullConfig.appName);
|
|
357049
|
+
return "".concat((0, exports.getArtifactsRegistryHost)(context), "/").concat(deployConfig.projectId, "/catladder-deploy/").concat(fullAppName);
|
|
357050
|
+
};
|
|
357051
|
+
exports.getArtifactsRegistryDockerUrl = getArtifactsRegistryDockerUrl;
|
|
357039
357052
|
/**
|
|
357040
357053
|
*
|
|
357041
357054
|
* lecacyReviewImageName is only temporary. In old versions the images had no reviewslug in review apps, which makes cleanup harder. We delete all those images now, but need the path
|
|
@@ -357045,20 +357058,20 @@ var getArtifactsRegistryImageName = function (context, lecacyReviewImageName) {
|
|
|
357045
357058
|
if (lecacyReviewImageName === void 0) {
|
|
357046
357059
|
lecacyReviewImageName = false;
|
|
357047
357060
|
}
|
|
357048
|
-
var deployConfig = context.componentConfig.deploy;
|
|
357049
|
-
if (!(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
|
|
357050
|
-
// should not happen
|
|
357051
|
-
throw new Error("deploy config is wrong");
|
|
357052
|
-
}
|
|
357053
357061
|
if (lecacyReviewImageName && context.environment.envType !== "review") {
|
|
357054
357062
|
throw new Error("lecacyReviewImageName is only allowed for review app");
|
|
357055
357063
|
}
|
|
357056
|
-
var
|
|
357057
|
-
var dockerUrl = "".concat((0, exports.getArtifactsRegistryHost)(context), "/").concat(deployConfig.projectId, "/catladder-deploy/").concat(fullAppName);
|
|
357064
|
+
var dockerUrl = (0, exports.getArtifactsRegistryDockerUrl)(context);
|
|
357058
357065
|
var gcloudImagePath = __spreadArray([dockerUrl, context.environment.shortName, context.componentName], __read(context.environment.envType === "review" && !lecacyReviewImageName ? [(_a = context.commitInfo) === null || _a === void 0 ? void 0 : _a.reviewSlug] : []), false);
|
|
357059
357066
|
return gcloudImagePath.join("/");
|
|
357060
357067
|
};
|
|
357061
357068
|
exports.getArtifactsRegistryImageName = getArtifactsRegistryImageName;
|
|
357069
|
+
var getArtifactsRegistryBuildCacheImage = function (context) {
|
|
357070
|
+
var dockerUrl = (0, exports.getArtifactsRegistryDockerUrl)(context);
|
|
357071
|
+
var gcloudImagePath = [dockerUrl, "_caches_", context.componentName];
|
|
357072
|
+
return gcloudImagePath.join("/");
|
|
357073
|
+
};
|
|
357074
|
+
exports.getArtifactsRegistryBuildCacheImage = getArtifactsRegistryBuildCacheImage;
|
|
357062
357075
|
var getArtifactsRegistryImage = function (context) {
|
|
357063
357076
|
return "".concat((0, exports.getArtifactsRegistryImageName)(context), ":$DOCKER_IMAGE_TAG");
|
|
357064
357077
|
};
|
package/package.json
CHANGED
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
}
|
|
53
53
|
],
|
|
54
54
|
"license": "MIT",
|
|
55
|
-
"version": "0.0.0-fix-cloud-run-ar-only-
|
|
55
|
+
"version": "0.0.0-fix-cloud-run-ar-only-efb4e634",
|
|
56
56
|
"scripts": {
|
|
57
57
|
"lint": "eslint \"src/**/*.ts\"",
|
|
58
58
|
"lint:fix": "eslint \"src/**/*.ts\" --fix",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"node": ">=12.0.0"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@catladder/pipeline": "0.0.0-fix-cloud-run-ar-only-
|
|
76
|
+
"@catladder/pipeline": "0.0.0-fix-cloud-run-ar-only-efb4e634",
|
|
77
77
|
"@kubernetes/client-node": "^0.16.2",
|
|
78
78
|
"@tsconfig/node14": "^1.0.1",
|
|
79
79
|
"@types/common-tags": "^1.8.0",
|