@catladder/cli 0.0.0-main-769c42d3 → 0.0.0-main-e3289b9f
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 +107 -6
- package/dist/bundles/cli/index.js +107 -6
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -40532,7 +40532,7 @@ var createRailsBuildJobs = function (context) {
|
|
|
40532
40532
|
dockerBuild: {
|
|
40533
40533
|
variables: __assign(__assign({}, context.environment.jobOnlyVars.build.envVars), context.componentConfig.build.extraVars),
|
|
40534
40534
|
// custom script
|
|
40535
|
-
script: __spreadArray(__spreadArray([], __read((0, docker_1.gitlabDockerLogin)(context)), false), ["docker pull $DOCKER_CACHE_IMAGE || true", "wget --output-document=- https://github.com/buildpacks/pack/releases/download/v".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "/pack-v").concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "-linux.tgz | tar -zx --directory /usr/local/bin pack"), "chmod +x /usr/local/bin/pack",
|
|
40535
|
+
script: __spreadArray(__spreadArray([], __read((0, docker_1.gitlabDockerLogin)(context)), false), ["cd ".concat(context.componentConfig.dir), "docker pull $DOCKER_CACHE_IMAGE || true", "wget --output-document=- https://github.com/buildpacks/pack/releases/download/v".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "/pack-v").concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "-linux.tgz | tar -zx --directory /usr/local/bin pack"), "chmod +x /usr/local/bin/pack",
|
|
40536
40536
|
// replace private git ssh gem sources with https to make bundler with credentials via env var work
|
|
40537
40537
|
"sed --in-place 's|git@\\([^:]*\\):|https://\\1/|g' Gemfile Gemfile.lock", "pack build \"$DOCKER_IMAGE:$DOCKER_IMAGE_TAG\" --builder '".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.image, "' --publish --cache-image \"$DOCKER_CACHE_IMAGE\" ").concat(packEnvArgs, " ").concat((_c = (_b = cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packExtraArgs) === null || _b === void 0 ? void 0 : _b.join(" ")) !== null && _c !== void 0 ? _c : "")], false)
|
|
40538
40538
|
}
|
|
@@ -40917,7 +40917,7 @@ exports.readConfigSync = readConfigSync;
|
|
|
40917
40917
|
|
|
40918
40918
|
exports.__esModule = true;
|
|
40919
40919
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
40920
|
-
exports.PIPELINE_IMAGE_TAG = "main-
|
|
40920
|
+
exports.PIPELINE_IMAGE_TAG = "main-e3289b9f" || 0;
|
|
40921
40921
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
|
|
40922
40922
|
|
|
40923
40923
|
/***/ }),
|
|
@@ -42758,6 +42758,7 @@ var createArgsString_1 = __nccwpck_require__(8686);
|
|
|
42758
42758
|
var jobName_1 = __nccwpck_require__(7311);
|
|
42759
42759
|
var common_1 = __nccwpck_require__(5655);
|
|
42760
42760
|
var getLabels_1 = __nccwpck_require__(486);
|
|
42761
|
+
var volumes_1 = __nccwpck_require__(8662);
|
|
42761
42762
|
var getJobRunScriptForJob = function (context, jobName, wait) {
|
|
42762
42763
|
var commonArgs = (0, common_1.getCommonCloudRunArgs)(context);
|
|
42763
42764
|
var commonArgsString = (0, createArgsString_1.createArgsString)(commonArgs);
|
|
@@ -42812,6 +42813,8 @@ var getJobCreateScripts = function (context) {
|
|
|
42812
42813
|
exports.getJobCreateScripts = getJobCreateScripts;
|
|
42813
42814
|
var getJobCreateScriptsForJob = function (context, jobName, job) {
|
|
42814
42815
|
var commonDeployArgs = (0, common_1.getCommonDeployArgs)(context);
|
|
42816
|
+
// due to some oversight from google, jobs create does not yet accept `--add-volume` 🤦
|
|
42817
|
+
// lucky, update on the other hand accepts it... so let's just imediatly update it
|
|
42815
42818
|
// we cannot upsert a job, so we have to create it and catch the error and then update
|
|
42816
42819
|
var commandArray = Array.isArray(job.command) ? job.command : job.command.split(" ");
|
|
42817
42820
|
var commonDeployArgsString = (0, createArgsString_1.createArgsString)(__assign(__assign({
|
|
@@ -42827,8 +42830,9 @@ var getJobCreateScriptsForJob = function (context, jobName, job) {
|
|
|
42827
42830
|
"env-vars-file": "____envvars.yaml",
|
|
42828
42831
|
"max-retries": 0
|
|
42829
42832
|
}));
|
|
42833
|
+
var requiresBeta = (job === null || job === void 0 ? void 0 : job.volumes) && Object.keys(job === null || job === void 0 ? void 0 : job.volumes).length > 0;
|
|
42830
42834
|
var argsString = "".concat(jobName, " ").concat(commonDeployArgsString);
|
|
42831
|
-
return __spreadArray(__spreadArray([], __read((0, gitlab_1.allowFailureInScripts)(["".concat((0, common_1.gcloudRunCmd)(), " jobs create ").concat(argsString)])), false), ["".concat((0, common_1.gcloudRunCmd)(), " jobs update ").concat(argsString)], false);
|
|
42835
|
+
return __spreadArray(__spreadArray([], __read((0, gitlab_1.allowFailureInScripts)(["".concat((0, common_1.gcloudRunCmd)(), " jobs create ").concat(argsString)])), false), ["".concat((0, common_1.gcloudRunCmd)(requiresBeta ? "beta" : undefined), " jobs update ").concat(argsString, " ").concat(createArgsString_1.createArgsString.apply(void 0, __spreadArray([], __read((0, volumes_1.createVolumeConfig)(job === null || job === void 0 ? void 0 : job.volumes, "job")), false)))], false);
|
|
42832
42836
|
};
|
|
42833
42837
|
var getCreateScheduleScripts = function (context) {
|
|
42834
42838
|
var jobsWithSchedule = getCloudRunJobsWithSchedule(context);
|
|
@@ -42906,12 +42910,44 @@ var __assign = this && this.__assign || function () {
|
|
|
42906
42910
|
};
|
|
42907
42911
|
return __assign.apply(this, arguments);
|
|
42908
42912
|
};
|
|
42913
|
+
var __read = this && this.__read || function (o, n) {
|
|
42914
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
42915
|
+
if (!m) return o;
|
|
42916
|
+
var i = m.call(o),
|
|
42917
|
+
r,
|
|
42918
|
+
ar = [],
|
|
42919
|
+
e;
|
|
42920
|
+
try {
|
|
42921
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
42922
|
+
} catch (error) {
|
|
42923
|
+
e = {
|
|
42924
|
+
error: error
|
|
42925
|
+
};
|
|
42926
|
+
} finally {
|
|
42927
|
+
try {
|
|
42928
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
42929
|
+
} finally {
|
|
42930
|
+
if (e) throw e.error;
|
|
42931
|
+
}
|
|
42932
|
+
}
|
|
42933
|
+
return ar;
|
|
42934
|
+
};
|
|
42935
|
+
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
42936
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
42937
|
+
if (ar || !(i in from)) {
|
|
42938
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
42939
|
+
ar[i] = from[i];
|
|
42940
|
+
}
|
|
42941
|
+
}
|
|
42942
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
42943
|
+
};
|
|
42909
42944
|
exports.__esModule = true;
|
|
42910
42945
|
exports.getServiceDeleteScript = exports.getServiceDeployScript = void 0;
|
|
42911
42946
|
var getLabels_1 = __nccwpck_require__(486);
|
|
42912
42947
|
var createArgsString_1 = __nccwpck_require__(8686);
|
|
42913
42948
|
var getServiceName_1 = __nccwpck_require__(9391);
|
|
42914
42949
|
var common_1 = __nccwpck_require__(5655);
|
|
42950
|
+
var volumes_1 = __nccwpck_require__(8662);
|
|
42915
42951
|
var getServiceDeployScript = function (context, service, nameSuffix) {
|
|
42916
42952
|
var _a, _b, _c, _d, _e;
|
|
42917
42953
|
var commonDeployArgs = (0, common_1.getCommonDeployArgs)(context);
|
|
@@ -42920,7 +42956,7 @@ var getServiceDeployScript = function (context, service, nameSuffix) {
|
|
|
42920
42956
|
var command = service !== true ? (_a = service === null || service === void 0 ? void 0 : service.command) !== null && _a !== void 0 ? _a : context.componentConfig.build.startCommand : undefined;
|
|
42921
42957
|
var commandArray = command ? Array.isArray(command) ? command : command.split(" ") : undefined;
|
|
42922
42958
|
var fullServiceName = "".concat(serviceName).concat(nameSuffix !== null && nameSuffix !== void 0 ? nameSuffix : "");
|
|
42923
|
-
var argsString = (0,
|
|
42959
|
+
var argsString = createArgsString_1.createArgsString.apply(void 0, __spreadArray([__assign(__assign({
|
|
42924
42960
|
// command as empty string resets it to default (uses the image's entrypoint)
|
|
42925
42961
|
command: commandArray ? '"' + commandArray.join(",") + '"' : '""'
|
|
42926
42962
|
}, commonDeployArgs), {
|
|
@@ -42936,8 +42972,10 @@ var getServiceDeployScript = function (context, service, nameSuffix) {
|
|
|
42936
42972
|
ingress: (_e = customConfig === null || customConfig === void 0 ? void 0 : customConfig.ingress) !== null && _e !== void 0 ? _e : "all",
|
|
42937
42973
|
"cpu-boost": true,
|
|
42938
42974
|
"execution-environment": customConfig === null || customConfig === void 0 ? void 0 : customConfig.executionEnvironment
|
|
42939
|
-
}));
|
|
42940
|
-
|
|
42975
|
+
})], __read((0, volumes_1.createVolumeConfig)(customConfig === null || customConfig === void 0 ? void 0 : customConfig.volumes, "service")), false));
|
|
42976
|
+
// volumes require beta
|
|
42977
|
+
var requiresBeta = (customConfig === null || customConfig === void 0 ? void 0 : customConfig.volumes) && Object.keys(customConfig === null || customConfig === void 0 ? void 0 : customConfig.volumes).length > 0;
|
|
42978
|
+
return "".concat((0, common_1.gcloudRunCmd)(requiresBeta ? "beta" : undefined), " deploy ").concat(fullServiceName, " ").concat(argsString);
|
|
42941
42979
|
};
|
|
42942
42980
|
exports.getServiceDeployScript = getServiceDeployScript;
|
|
42943
42981
|
var getServiceDeleteScript = function (context, serviceSuffix) {
|
|
@@ -43246,6 +43284,69 @@ exports.getDeployJobVariables = getDeployJobVariables;
|
|
|
43246
43284
|
|
|
43247
43285
|
/***/ }),
|
|
43248
43286
|
|
|
43287
|
+
/***/ 8662:
|
|
43288
|
+
/***/ (function(__unused_webpack_module, exports) {
|
|
43289
|
+
|
|
43290
|
+
"use strict";
|
|
43291
|
+
|
|
43292
|
+
|
|
43293
|
+
var __read = this && this.__read || function (o, n) {
|
|
43294
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
43295
|
+
if (!m) return o;
|
|
43296
|
+
var i = m.call(o),
|
|
43297
|
+
r,
|
|
43298
|
+
ar = [],
|
|
43299
|
+
e;
|
|
43300
|
+
try {
|
|
43301
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
43302
|
+
} catch (error) {
|
|
43303
|
+
e = {
|
|
43304
|
+
error: error
|
|
43305
|
+
};
|
|
43306
|
+
} finally {
|
|
43307
|
+
try {
|
|
43308
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
43309
|
+
} finally {
|
|
43310
|
+
if (e) throw e.error;
|
|
43311
|
+
}
|
|
43312
|
+
}
|
|
43313
|
+
return ar;
|
|
43314
|
+
};
|
|
43315
|
+
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
43316
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
43317
|
+
if (ar || !(i in from)) {
|
|
43318
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
43319
|
+
ar[i] = from[i];
|
|
43320
|
+
}
|
|
43321
|
+
}
|
|
43322
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
43323
|
+
};
|
|
43324
|
+
exports.__esModule = true;
|
|
43325
|
+
exports.createVolumeConfig = void 0;
|
|
43326
|
+
var createVolumeConfig = function (volumes, type) {
|
|
43327
|
+
if (!volumes) {
|
|
43328
|
+
return [];
|
|
43329
|
+
}
|
|
43330
|
+
return __spreadArray(__spreadArray([], __read(Object.entries(volumes).map(function (_a) {
|
|
43331
|
+
var _b = __read(_a, 2),
|
|
43332
|
+
volumeName = _b[0],
|
|
43333
|
+
_c = _b[1],
|
|
43334
|
+
type = _c.type,
|
|
43335
|
+
bucket = _c.bucket,
|
|
43336
|
+
mountPath = _c.mountPath,
|
|
43337
|
+
readonly = _c.readonly;
|
|
43338
|
+
return {
|
|
43339
|
+
"add-volume": "name=".concat(volumeName, ",type=").concat(type, ",bucket=").concat(bucket).concat(readonly ? ",readonly=true" : ""),
|
|
43340
|
+
"add-volume-mount": "volume=".concat(volumeName, ",mount-path=").concat(mountPath)
|
|
43341
|
+
};
|
|
43342
|
+
})), false), [type === "service" ? {
|
|
43343
|
+
"execution-environment": "gen2"
|
|
43344
|
+
} : {}], false);
|
|
43345
|
+
};
|
|
43346
|
+
exports.createVolumeConfig = createVolumeConfig;
|
|
43347
|
+
|
|
43348
|
+
/***/ }),
|
|
43349
|
+
|
|
43249
43350
|
/***/ 1344:
|
|
43250
43351
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
43251
43352
|
|
|
@@ -355462,7 +355462,7 @@ var createRailsBuildJobs = function (context) {
|
|
|
355462
355462
|
dockerBuild: {
|
|
355463
355463
|
variables: __assign(__assign({}, context.environment.jobOnlyVars.build.envVars), context.componentConfig.build.extraVars),
|
|
355464
355464
|
// custom script
|
|
355465
|
-
script: __spreadArray(__spreadArray([], __read((0, docker_1.gitlabDockerLogin)(context)), false), ["docker pull $DOCKER_CACHE_IMAGE || true", "wget --output-document=- https://github.com/buildpacks/pack/releases/download/v".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "/pack-v").concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "-linux.tgz | tar -zx --directory /usr/local/bin pack"), "chmod +x /usr/local/bin/pack",
|
|
355465
|
+
script: __spreadArray(__spreadArray([], __read((0, docker_1.gitlabDockerLogin)(context)), false), ["cd ".concat(context.componentConfig.dir), "docker pull $DOCKER_CACHE_IMAGE || true", "wget --output-document=- https://github.com/buildpacks/pack/releases/download/v".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "/pack-v").concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "-linux.tgz | tar -zx --directory /usr/local/bin pack"), "chmod +x /usr/local/bin/pack",
|
|
355466
355466
|
// replace private git ssh gem sources with https to make bundler with credentials via env var work
|
|
355467
355467
|
"sed --in-place 's|git@\\([^:]*\\):|https://\\1/|g' Gemfile Gemfile.lock", "pack build \"$DOCKER_IMAGE:$DOCKER_IMAGE_TAG\" --builder '".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.image, "' --publish --cache-image \"$DOCKER_CACHE_IMAGE\" ").concat(packEnvArgs, " ").concat((_c = (_b = cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packExtraArgs) === null || _b === void 0 ? void 0 : _b.join(" ")) !== null && _c !== void 0 ? _c : "")], false)
|
|
355468
355468
|
}
|
|
@@ -355847,7 +355847,7 @@ exports.readConfigSync = readConfigSync;
|
|
|
355847
355847
|
|
|
355848
355848
|
exports.__esModule = true;
|
|
355849
355849
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
355850
|
-
exports.PIPELINE_IMAGE_TAG = "main-
|
|
355850
|
+
exports.PIPELINE_IMAGE_TAG = "main-e3289b9f" || 0;
|
|
355851
355851
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
|
|
355852
355852
|
|
|
355853
355853
|
/***/ }),
|
|
@@ -357688,6 +357688,7 @@ var createArgsString_1 = __nccwpck_require__(8686);
|
|
|
357688
357688
|
var jobName_1 = __nccwpck_require__(77311);
|
|
357689
357689
|
var common_1 = __nccwpck_require__(75655);
|
|
357690
357690
|
var getLabels_1 = __nccwpck_require__(30486);
|
|
357691
|
+
var volumes_1 = __nccwpck_require__(84497);
|
|
357691
357692
|
var getJobRunScriptForJob = function (context, jobName, wait) {
|
|
357692
357693
|
var commonArgs = (0, common_1.getCommonCloudRunArgs)(context);
|
|
357693
357694
|
var commonArgsString = (0, createArgsString_1.createArgsString)(commonArgs);
|
|
@@ -357742,6 +357743,8 @@ var getJobCreateScripts = function (context) {
|
|
|
357742
357743
|
exports.getJobCreateScripts = getJobCreateScripts;
|
|
357743
357744
|
var getJobCreateScriptsForJob = function (context, jobName, job) {
|
|
357744
357745
|
var commonDeployArgs = (0, common_1.getCommonDeployArgs)(context);
|
|
357746
|
+
// due to some oversight from google, jobs create does not yet accept `--add-volume` 🤦
|
|
357747
|
+
// lucky, update on the other hand accepts it... so let's just imediatly update it
|
|
357745
357748
|
// we cannot upsert a job, so we have to create it and catch the error and then update
|
|
357746
357749
|
var commandArray = Array.isArray(job.command) ? job.command : job.command.split(" ");
|
|
357747
357750
|
var commonDeployArgsString = (0, createArgsString_1.createArgsString)(__assign(__assign({
|
|
@@ -357757,8 +357760,9 @@ var getJobCreateScriptsForJob = function (context, jobName, job) {
|
|
|
357757
357760
|
"env-vars-file": "____envvars.yaml",
|
|
357758
357761
|
"max-retries": 0
|
|
357759
357762
|
}));
|
|
357763
|
+
var requiresBeta = (job === null || job === void 0 ? void 0 : job.volumes) && Object.keys(job === null || job === void 0 ? void 0 : job.volumes).length > 0;
|
|
357760
357764
|
var argsString = "".concat(jobName, " ").concat(commonDeployArgsString);
|
|
357761
|
-
return __spreadArray(__spreadArray([], __read((0, gitlab_1.allowFailureInScripts)(["".concat((0, common_1.gcloudRunCmd)(), " jobs create ").concat(argsString)])), false), ["".concat((0, common_1.gcloudRunCmd)(), " jobs update ").concat(argsString)], false);
|
|
357765
|
+
return __spreadArray(__spreadArray([], __read((0, gitlab_1.allowFailureInScripts)(["".concat((0, common_1.gcloudRunCmd)(), " jobs create ").concat(argsString)])), false), ["".concat((0, common_1.gcloudRunCmd)(requiresBeta ? "beta" : undefined), " jobs update ").concat(argsString, " ").concat(createArgsString_1.createArgsString.apply(void 0, __spreadArray([], __read((0, volumes_1.createVolumeConfig)(job === null || job === void 0 ? void 0 : job.volumes, "job")), false)))], false);
|
|
357762
357766
|
};
|
|
357763
357767
|
var getCreateScheduleScripts = function (context) {
|
|
357764
357768
|
var jobsWithSchedule = getCloudRunJobsWithSchedule(context);
|
|
@@ -357836,12 +357840,44 @@ var __assign = this && this.__assign || function () {
|
|
|
357836
357840
|
};
|
|
357837
357841
|
return __assign.apply(this, arguments);
|
|
357838
357842
|
};
|
|
357843
|
+
var __read = this && this.__read || function (o, n) {
|
|
357844
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
357845
|
+
if (!m) return o;
|
|
357846
|
+
var i = m.call(o),
|
|
357847
|
+
r,
|
|
357848
|
+
ar = [],
|
|
357849
|
+
e;
|
|
357850
|
+
try {
|
|
357851
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
357852
|
+
} catch (error) {
|
|
357853
|
+
e = {
|
|
357854
|
+
error: error
|
|
357855
|
+
};
|
|
357856
|
+
} finally {
|
|
357857
|
+
try {
|
|
357858
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
357859
|
+
} finally {
|
|
357860
|
+
if (e) throw e.error;
|
|
357861
|
+
}
|
|
357862
|
+
}
|
|
357863
|
+
return ar;
|
|
357864
|
+
};
|
|
357865
|
+
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
357866
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
357867
|
+
if (ar || !(i in from)) {
|
|
357868
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
357869
|
+
ar[i] = from[i];
|
|
357870
|
+
}
|
|
357871
|
+
}
|
|
357872
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
357873
|
+
};
|
|
357839
357874
|
exports.__esModule = true;
|
|
357840
357875
|
exports.getServiceDeleteScript = exports.getServiceDeployScript = void 0;
|
|
357841
357876
|
var getLabels_1 = __nccwpck_require__(30486);
|
|
357842
357877
|
var createArgsString_1 = __nccwpck_require__(8686);
|
|
357843
357878
|
var getServiceName_1 = __nccwpck_require__(89391);
|
|
357844
357879
|
var common_1 = __nccwpck_require__(75655);
|
|
357880
|
+
var volumes_1 = __nccwpck_require__(84497);
|
|
357845
357881
|
var getServiceDeployScript = function (context, service, nameSuffix) {
|
|
357846
357882
|
var _a, _b, _c, _d, _e;
|
|
357847
357883
|
var commonDeployArgs = (0, common_1.getCommonDeployArgs)(context);
|
|
@@ -357850,7 +357886,7 @@ var getServiceDeployScript = function (context, service, nameSuffix) {
|
|
|
357850
357886
|
var command = service !== true ? (_a = service === null || service === void 0 ? void 0 : service.command) !== null && _a !== void 0 ? _a : context.componentConfig.build.startCommand : undefined;
|
|
357851
357887
|
var commandArray = command ? Array.isArray(command) ? command : command.split(" ") : undefined;
|
|
357852
357888
|
var fullServiceName = "".concat(serviceName).concat(nameSuffix !== null && nameSuffix !== void 0 ? nameSuffix : "");
|
|
357853
|
-
var argsString = (0,
|
|
357889
|
+
var argsString = createArgsString_1.createArgsString.apply(void 0, __spreadArray([__assign(__assign({
|
|
357854
357890
|
// command as empty string resets it to default (uses the image's entrypoint)
|
|
357855
357891
|
command: commandArray ? '"' + commandArray.join(",") + '"' : '""'
|
|
357856
357892
|
}, commonDeployArgs), {
|
|
@@ -357866,8 +357902,10 @@ var getServiceDeployScript = function (context, service, nameSuffix) {
|
|
|
357866
357902
|
ingress: (_e = customConfig === null || customConfig === void 0 ? void 0 : customConfig.ingress) !== null && _e !== void 0 ? _e : "all",
|
|
357867
357903
|
"cpu-boost": true,
|
|
357868
357904
|
"execution-environment": customConfig === null || customConfig === void 0 ? void 0 : customConfig.executionEnvironment
|
|
357869
|
-
}));
|
|
357870
|
-
|
|
357905
|
+
})], __read((0, volumes_1.createVolumeConfig)(customConfig === null || customConfig === void 0 ? void 0 : customConfig.volumes, "service")), false));
|
|
357906
|
+
// volumes require beta
|
|
357907
|
+
var requiresBeta = (customConfig === null || customConfig === void 0 ? void 0 : customConfig.volumes) && Object.keys(customConfig === null || customConfig === void 0 ? void 0 : customConfig.volumes).length > 0;
|
|
357908
|
+
return "".concat((0, common_1.gcloudRunCmd)(requiresBeta ? "beta" : undefined), " deploy ").concat(fullServiceName, " ").concat(argsString);
|
|
357871
357909
|
};
|
|
357872
357910
|
exports.getServiceDeployScript = getServiceDeployScript;
|
|
357873
357911
|
var getServiceDeleteScript = function (context, serviceSuffix) {
|
|
@@ -358176,6 +358214,69 @@ exports.getDeployJobVariables = getDeployJobVariables;
|
|
|
358176
358214
|
|
|
358177
358215
|
/***/ }),
|
|
358178
358216
|
|
|
358217
|
+
/***/ 84497:
|
|
358218
|
+
/***/ (function(__unused_webpack_module, exports) {
|
|
358219
|
+
|
|
358220
|
+
"use strict";
|
|
358221
|
+
|
|
358222
|
+
|
|
358223
|
+
var __read = this && this.__read || function (o, n) {
|
|
358224
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
358225
|
+
if (!m) return o;
|
|
358226
|
+
var i = m.call(o),
|
|
358227
|
+
r,
|
|
358228
|
+
ar = [],
|
|
358229
|
+
e;
|
|
358230
|
+
try {
|
|
358231
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
358232
|
+
} catch (error) {
|
|
358233
|
+
e = {
|
|
358234
|
+
error: error
|
|
358235
|
+
};
|
|
358236
|
+
} finally {
|
|
358237
|
+
try {
|
|
358238
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
358239
|
+
} finally {
|
|
358240
|
+
if (e) throw e.error;
|
|
358241
|
+
}
|
|
358242
|
+
}
|
|
358243
|
+
return ar;
|
|
358244
|
+
};
|
|
358245
|
+
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
358246
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
358247
|
+
if (ar || !(i in from)) {
|
|
358248
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
358249
|
+
ar[i] = from[i];
|
|
358250
|
+
}
|
|
358251
|
+
}
|
|
358252
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
358253
|
+
};
|
|
358254
|
+
exports.__esModule = true;
|
|
358255
|
+
exports.createVolumeConfig = void 0;
|
|
358256
|
+
var createVolumeConfig = function (volumes, type) {
|
|
358257
|
+
if (!volumes) {
|
|
358258
|
+
return [];
|
|
358259
|
+
}
|
|
358260
|
+
return __spreadArray(__spreadArray([], __read(Object.entries(volumes).map(function (_a) {
|
|
358261
|
+
var _b = __read(_a, 2),
|
|
358262
|
+
volumeName = _b[0],
|
|
358263
|
+
_c = _b[1],
|
|
358264
|
+
type = _c.type,
|
|
358265
|
+
bucket = _c.bucket,
|
|
358266
|
+
mountPath = _c.mountPath,
|
|
358267
|
+
readonly = _c.readonly;
|
|
358268
|
+
return {
|
|
358269
|
+
"add-volume": "name=".concat(volumeName, ",type=").concat(type, ",bucket=").concat(bucket).concat(readonly ? ",readonly=true" : ""),
|
|
358270
|
+
"add-volume-mount": "volume=".concat(volumeName, ",mount-path=").concat(mountPath)
|
|
358271
|
+
};
|
|
358272
|
+
})), false), [type === "service" ? {
|
|
358273
|
+
"execution-environment": "gen2"
|
|
358274
|
+
} : {}], false);
|
|
358275
|
+
};
|
|
358276
|
+
exports.createVolumeConfig = createVolumeConfig;
|
|
358277
|
+
|
|
358278
|
+
/***/ }),
|
|
358279
|
+
|
|
358179
358280
|
/***/ 81344:
|
|
358180
358281
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
358181
358282
|
|