@catladder/cli 0.0.0-fix-add-missing-openssl-to-node-deploy-docker-4c13843a → 0.0.0-fix-rails-default-start-command-530390e3
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 +179 -39
- package/dist/bundles/cli/index.js +199 -60
- package/dist/cli/src/apps/cli/commands/project/commandSetup.js +5 -3
- package/dist/cli/src/apps/cli/commands/project/commandSetup.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/index.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/index.js +6 -17
- package/dist/cli/src/apps/cli/commands/project/setup/index.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/utils/autocompletions.d.ts +1 -0
- package/dist/cli/src/apps/cli/commands/project/utils/autocompletions.js +9 -1
- package/dist/cli/src/apps/cli/commands/project/utils/autocompletions.js.map +1 -1
- package/dist/cli/src/config/getProjectConfig.d.ts +1 -1
- package/dist/cli/src/config/getProjectConfig.js +7 -1
- package/dist/cli/src/config/getProjectConfig.js.map +1 -1
- package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.js +3 -1
- package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.js.map +1 -1
- package/dist/pipeline/src/build/base/index.d.ts +2 -3
- package/dist/pipeline/src/build/base/index.js.map +1 -1
- package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.js +6 -4
- package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.js.map +1 -1
- package/dist/pipeline/src/build/custom/buildJob.d.ts +2 -2
- package/dist/pipeline/src/build/custom/buildJob.js.map +1 -1
- package/dist/pipeline/src/build/custom/index.d.ts +2 -2
- package/dist/pipeline/src/build/custom/index.js.map +1 -1
- package/dist/pipeline/src/build/custom/testJob.d.ts +2 -2
- package/dist/pipeline/src/build/custom/testJob.js.map +1 -1
- package/dist/pipeline/src/build/docker.d.ts +4 -4
- package/dist/pipeline/src/build/docker.js.map +1 -1
- package/dist/pipeline/src/build/index.d.ts +2 -2
- package/dist/pipeline/src/build/index.js +0 -1
- package/dist/pipeline/src/build/index.js.map +1 -1
- package/dist/pipeline/src/build/node/buildJob.d.ts +5 -3
- package/dist/pipeline/src/build/node/buildJob.js.map +1 -1
- package/dist/pipeline/src/build/node/index.d.ts +4 -4
- package/dist/pipeline/src/build/node/index.js.map +1 -1
- package/dist/pipeline/src/build/node/meteor.d.ts +2 -2
- package/dist/pipeline/src/build/node/meteor.js.map +1 -1
- package/dist/pipeline/src/build/node/yarn.d.ts +1 -1
- package/dist/pipeline/src/build/node/yarn.js +3 -1
- package/dist/pipeline/src/build/node/yarn.js.map +1 -1
- package/dist/pipeline/src/build/rails/build.d.ts +2 -2
- package/dist/pipeline/src/build/rails/build.js.map +1 -1
- package/dist/pipeline/src/build/rails/index.d.ts +2 -2
- package/dist/pipeline/src/build/rails/index.js.map +1 -1
- package/dist/pipeline/src/build/sbom.d.ts +2 -2
- package/dist/pipeline/src/build/sbom.js.map +1 -1
- package/dist/pipeline/src/context/createComponentContext.js +17 -6
- package/dist/pipeline/src/context/createComponentContext.js.map +1 -1
- package/dist/pipeline/src/context/getLabels.js +3 -1
- package/dist/pipeline/src/context/getLabels.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.js +2 -2
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js +32 -7
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/onDeploy.d.ts +1 -2
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/onDeploy.js +3 -10
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/onDeploy.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/healthCheck.d.ts +5 -0
- package/dist/pipeline/src/deploy/cloudRun/createJobs/healthCheck.js +51 -0
- package/dist/pipeline/src/deploy/cloudRun/createJobs/healthCheck.js.map +1 -0
- package/dist/pipeline/src/deploy/cloudRun/utils/getJobOrServiceArgs.d.ts +2 -0
- package/dist/pipeline/src/deploy/cloudRun/utils/getJobOrServiceArgs.js +12 -0
- package/dist/pipeline/src/deploy/cloudRun/utils/getJobOrServiceArgs.js.map +1 -0
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.d.ts +2 -2
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.js +3 -1
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.js.map +1 -1
- package/dist/pipeline/src/deploy/sbom.js +4 -3
- package/dist/pipeline/src/deploy/sbom.js.map +1 -1
- package/dist/pipeline/src/deploy/types/googleCloudRun.d.ts +90 -0
- package/dist/pipeline/src/deploy/types/googleCloudRun.js +16 -0
- package/dist/pipeline/src/deploy/types/googleCloudRun.js.map +1 -1
- package/dist/pipeline/src/pipeline/createJobsForComponent.js +3 -1
- package/dist/pipeline/src/pipeline/createJobsForComponent.js.map +1 -1
- package/dist/pipeline/src/types/config.d.ts +1 -1
- package/dist/pipeline/src/types/context.d.ts +6 -1
- package/dist/pipeline/src/types/context.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/apps/cli/commands/project/commandSetup.ts +5 -3
- package/src/apps/cli/commands/project/setup/index.ts +9 -19
- package/src/apps/cli/commands/project/utils/autocompletions.ts +9 -0
- package/src/config/getProjectConfig.ts +12 -1
|
@@ -330,9 +330,15 @@ const getAllComponentsWithAllEnvsHierarchical = async () => {
|
|
|
330
330
|
]));
|
|
331
331
|
};
|
|
332
332
|
exports.getAllComponentsWithAllEnvsHierarchical = getAllComponentsWithAllEnvsHierarchical;
|
|
333
|
-
const getAllPipelineContexts = async () => {
|
|
333
|
+
const getAllPipelineContexts = async (onlyComponent) => {
|
|
334
|
+
const onlyComponentsArray = onlyComponent
|
|
335
|
+
? Array.isArray(onlyComponent)
|
|
336
|
+
? onlyComponent
|
|
337
|
+
: [onlyComponent]
|
|
338
|
+
: null;
|
|
334
339
|
return Promise.all((await (0, exports.getAllComponentsWithAllEnvsFlat)())
|
|
335
340
|
.filter((c) => c.env !== "local")
|
|
341
|
+
.filter((c) => !onlyComponentsArray || onlyComponentsArray.includes(c.componentName))
|
|
336
342
|
.map(({ env, componentName }) => (0, exports.getPipelineContextByChoice)(env, componentName)));
|
|
337
343
|
};
|
|
338
344
|
exports.getAllPipelineContexts = getAllPipelineContexts;
|
|
@@ -1226,7 +1232,9 @@ exports.createBuildJobArtifacts = createBuildJobArtifacts;
|
|
|
1226
1232
|
const getArtifactsPathForComponent = (c, additionalPaths) => {
|
|
1227
1233
|
var _a, _b;
|
|
1228
1234
|
return (_b = [
|
|
1229
|
-
...(
|
|
1235
|
+
...(c.build.type !== "disabled"
|
|
1236
|
+
? ((_a = c.build.config.artifactsPaths) !== null && _a !== void 0 ? _a : [])
|
|
1237
|
+
: []),
|
|
1230
1238
|
...(additionalPaths !== null && additionalPaths !== void 0 ? additionalPaths : []),
|
|
1231
1239
|
]) === null || _b === void 0 ? void 0 : _b.flatMap((artifact) => c.build
|
|
1232
1240
|
// in theory, we only need "direct",
|
|
@@ -1602,10 +1610,12 @@ const getAllCacheConfigsFromConfig = (context, configWithCache) => {
|
|
|
1602
1610
|
// we would probably need to introduce a path to the right config property (build-->test or so)
|
|
1603
1611
|
context.components.flatMap((componentContext) => {
|
|
1604
1612
|
var _a;
|
|
1605
|
-
return
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1613
|
+
return componentContext.build.type !== "disabled"
|
|
1614
|
+
? ((_a = (0, index_1.ensureArray)(componentContext.build.config.cache).map((c) => ({
|
|
1615
|
+
...c,
|
|
1616
|
+
baseDir: componentContext.build.dir,
|
|
1617
|
+
}))) !== null && _a !== void 0 ? _a : [])
|
|
1618
|
+
: [];
|
|
1609
1619
|
})
|
|
1610
1620
|
: []),
|
|
1611
1621
|
];
|
|
@@ -1996,7 +2006,6 @@ exports.BUILD_TYPES = {
|
|
|
1996
2006
|
rails: {
|
|
1997
2007
|
jobs: rails_1.createRailsJobs,
|
|
1998
2008
|
defaults: () => ({
|
|
1999
|
-
startCommand: "/cnb/process/web",
|
|
2000
2009
|
cnbBuilder: {
|
|
2001
2010
|
image: "heroku/builder:22",
|
|
2002
2011
|
packVersion: "0.32.1",
|
|
@@ -2373,7 +2382,9 @@ const ensureNodeVersion = (context) => (0, gitlab_1.collapseableSection)("nodein
|
|
|
2373
2382
|
]);
|
|
2374
2383
|
exports.ensureNodeVersion = ensureNodeVersion;
|
|
2375
2384
|
const getYarnInstall = (context, options) => {
|
|
2376
|
-
const postInstall = context.type !== "workspace" &&
|
|
2385
|
+
const postInstall = context.type !== "workspace" &&
|
|
2386
|
+
context.build.type !== "disabled" &&
|
|
2387
|
+
"postInstall" in context.build.config
|
|
2377
2388
|
? context.build.config.postInstall
|
|
2378
2389
|
: null;
|
|
2379
2390
|
return [
|
|
@@ -2831,19 +2842,23 @@ const createComponentContext = async (ctx) => {
|
|
|
2831
2842
|
const packageManagerInfo = await (0, packageManager_1.getPackageManagerInfoForComponent)(ctx.config, ctx.componentName);
|
|
2832
2843
|
const envContext = (0, getEnvironmentContext_1.getEnvironmentContext)(ctx);
|
|
2833
2844
|
const componentConfigWithoutDefaults = envContext.envConfigRaw;
|
|
2834
|
-
const resolvedBuildType =
|
|
2835
|
-
?
|
|
2836
|
-
: (
|
|
2837
|
-
|
|
2845
|
+
const resolvedBuildType = componentConfigWithoutDefaults.build === false
|
|
2846
|
+
? false
|
|
2847
|
+
: (0, build_1.isStandaloneBuildConfig)(componentConfigWithoutDefaults.build)
|
|
2848
|
+
? componentConfigWithoutDefaults.build.type
|
|
2849
|
+
: (_a = ctx.config.builds) === null || _a === void 0 ? void 0 : _a[componentConfigWithoutDefaults.build.from].type;
|
|
2850
|
+
if (resolvedBuildType === undefined) {
|
|
2838
2851
|
throw new Error("build type not found, is the build config correct?");
|
|
2839
2852
|
}
|
|
2840
2853
|
const defaults = componentConfigWithoutDefaults.deploy
|
|
2841
2854
|
? {
|
|
2842
|
-
build:
|
|
2855
|
+
build: resolvedBuildType &&
|
|
2856
|
+
build_1.BUILD_TYPES[resolvedBuildType].defaults(envContext),
|
|
2843
2857
|
deploy: deploy_1.DEPLOY_TYPES[componentConfigWithoutDefaults.deploy.type].defaults(envContext),
|
|
2844
2858
|
}
|
|
2845
2859
|
: {
|
|
2846
|
-
build:
|
|
2860
|
+
build: resolvedBuildType &&
|
|
2861
|
+
build_1.BUILD_TYPES[resolvedBuildType].defaults(envContext),
|
|
2847
2862
|
deploy: {},
|
|
2848
2863
|
};
|
|
2849
2864
|
const componentConfig = (0, utils_1.mergeWithMergingArrays)(defaults, componentConfigWithoutDefaults);
|
|
@@ -2861,6 +2876,13 @@ const createComponentContext = async (ctx) => {
|
|
|
2861
2876
|
};
|
|
2862
2877
|
const _getBuildContext = () => {
|
|
2863
2878
|
var _a;
|
|
2879
|
+
if (build === false) {
|
|
2880
|
+
return {
|
|
2881
|
+
type: "disabled",
|
|
2882
|
+
getComponentDirs,
|
|
2883
|
+
dir,
|
|
2884
|
+
};
|
|
2885
|
+
}
|
|
2864
2886
|
if ((0, build_1.isStandaloneBuildConfig)(build)) {
|
|
2865
2887
|
return {
|
|
2866
2888
|
dir: dir,
|
|
@@ -3277,7 +3299,9 @@ const getLabels = (context) => {
|
|
|
3277
3299
|
"app-name": sanitize(context.fullConfig.appName),
|
|
3278
3300
|
"env-type": sanitize(context.environment.envType),
|
|
3279
3301
|
"env-name": sanitize(context.env),
|
|
3280
|
-
"build-type":
|
|
3302
|
+
"build-type": context.build.type === "disabled"
|
|
3303
|
+
? "disabled"
|
|
3304
|
+
: sanitize(context.build.buildType),
|
|
3281
3305
|
...((_b = (_a = context.fullConfig.meta) === null || _a === void 0 ? void 0 : _a.labels) !== null && _b !== void 0 ? _b : {}),
|
|
3282
3306
|
};
|
|
3283
3307
|
return labels;
|
|
@@ -3871,7 +3895,7 @@ const jobName_1 = __nccwpck_require__(9626);
|
|
|
3871
3895
|
const common_1 = __nccwpck_require__(3325);
|
|
3872
3896
|
const constants_1 = __nccwpck_require__(8865);
|
|
3873
3897
|
const volumes_1 = __nccwpck_require__(847);
|
|
3874
|
-
const
|
|
3898
|
+
const getJobOrServiceArgs_1 = __nccwpck_require__(1741);
|
|
3875
3899
|
const getDeleteJobsScripts = (context) => {
|
|
3876
3900
|
const commonArgs = (0, common_1.getCommonCloudRunArgs)(context);
|
|
3877
3901
|
const commonArgsString = (0, createArgsString_1.createArgsString)(commonArgs);
|
|
@@ -3891,7 +3915,7 @@ const getJobCreateScripts = (context) => (0, exports.getCloudRunJobsWithNames)(c
|
|
|
3891
3915
|
const { image: commonImage, project, region, ...deployArgs } = (0, common_1.getCommonDeployArgs)(context);
|
|
3892
3916
|
const commonDeployArgsString = (0, createArgsString_1.createArgsString)({
|
|
3893
3917
|
command: `"${commandArray.join(",")}"`,
|
|
3894
|
-
args: (0,
|
|
3918
|
+
args: (0, getJobOrServiceArgs_1.getCloudRunServiceOrJobArgsArg)(job.args),
|
|
3895
3919
|
labels: `"${(0, common_1.makeLabelString)((0, getLabels_1.getLabels)(context))},cloud-run-job-name=$current_job_name"`,
|
|
3896
3920
|
image: `"${(_a = job.image) !== null && _a !== void 0 ? _a : commonImage}"`,
|
|
3897
3921
|
project,
|
|
@@ -3951,17 +3975,21 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
3951
3975
|
exports.getServiceDeleteScript = exports.getServiceDeployScript = void 0;
|
|
3952
3976
|
const getLabels_1 = __nccwpck_require__(920);
|
|
3953
3977
|
const createArgsString_1 = __nccwpck_require__(9598);
|
|
3978
|
+
const getJobOrServiceArgs_1 = __nccwpck_require__(1741);
|
|
3954
3979
|
const getServiceName_1 = __nccwpck_require__(8128);
|
|
3955
3980
|
const common_1 = __nccwpck_require__(3325);
|
|
3956
3981
|
const constants_1 = __nccwpck_require__(8865);
|
|
3982
|
+
const healthCheck_1 = __nccwpck_require__(193);
|
|
3957
3983
|
const volumes_1 = __nccwpck_require__(847);
|
|
3958
3984
|
const getServiceDeployScript = (context, service, nameSuffix) => {
|
|
3959
|
-
var _a, _b, _c, _d, _e;
|
|
3985
|
+
var _a, _b, _c, _d, _e, _f;
|
|
3960
3986
|
const commonDeployArgs = (0, common_1.getCommonDeployArgs)(context);
|
|
3961
3987
|
const serviceName = (0, getServiceName_1.getServiceName)(context);
|
|
3962
3988
|
const customConfig = service !== true ? service : undefined;
|
|
3963
3989
|
const command = service !== true
|
|
3964
|
-
? ((_a = service === null || service === void 0 ? void 0 : service.command) !== null && _a !== void 0 ? _a : context.build.
|
|
3990
|
+
? ((_a = service === null || service === void 0 ? void 0 : service.command) !== null && _a !== void 0 ? _a : (context.build.type !== "disabled"
|
|
3991
|
+
? context.build.config.startCommand
|
|
3992
|
+
: undefined))
|
|
3965
3993
|
: undefined;
|
|
3966
3994
|
const commandArray = command
|
|
3967
3995
|
? Array.isArray(command)
|
|
@@ -3972,14 +4000,16 @@ const getServiceDeployScript = (context, service, nameSuffix) => {
|
|
|
3972
4000
|
const argsString = (0, createArgsString_1.createArgsString)({
|
|
3973
4001
|
// command as empty string resets it to default (uses the image's entrypoint)
|
|
3974
4002
|
command: commandArray ? '"' + commandArray.join(",") + '"' : '""',
|
|
4003
|
+
args: (0, getJobOrServiceArgs_1.getCloudRunServiceOrJobArgsArg)(customConfig === null || customConfig === void 0 ? void 0 : customConfig.args),
|
|
3975
4004
|
...commonDeployArgs,
|
|
4005
|
+
image: (_b = customConfig === null || customConfig === void 0 ? void 0 : customConfig.image) !== null && _b !== void 0 ? _b : commonDeployArgs.image,
|
|
3976
4006
|
labels: (0, common_1.makeLabelString)({
|
|
3977
4007
|
...(0, getLabels_1.getLabels)(context),
|
|
3978
4008
|
"cloud-run-service-name": fullServiceName,
|
|
3979
4009
|
}),
|
|
3980
4010
|
"env-vars-file": constants_1.ENV_VARS_FILENAME,
|
|
3981
|
-
"min-instances": (
|
|
3982
|
-
"max-instances": (
|
|
4011
|
+
"min-instances": (_c = customConfig === null || customConfig === void 0 ? void 0 : customConfig.minInstances) !== null && _c !== void 0 ? _c : 0,
|
|
4012
|
+
"max-instances": (_d = customConfig === null || customConfig === void 0 ? void 0 : customConfig.maxInstances) !== null && _d !== void 0 ? _d : 100,
|
|
3983
4013
|
"cpu-throttling": (customConfig === null || customConfig === void 0 ? void 0 : customConfig.noCpuThrottling) !== true,
|
|
3984
4014
|
cpu: customConfig === null || customConfig === void 0 ? void 0 : customConfig.cpu,
|
|
3985
4015
|
memory: customConfig === null || customConfig === void 0 ? void 0 : customConfig.memory,
|
|
@@ -3989,12 +4019,16 @@ const getServiceDeployScript = (context, service, nameSuffix) => {
|
|
|
3989
4019
|
network: customConfig === null || customConfig === void 0 ? void 0 : customConfig.network,
|
|
3990
4020
|
subnet: customConfig === null || customConfig === void 0 ? void 0 : customConfig.subnet,
|
|
3991
4021
|
"use-http2": customConfig === null || customConfig === void 0 ? void 0 : customConfig.http2,
|
|
3992
|
-
"allow-unauthenticated": (
|
|
3993
|
-
ingress: (
|
|
4022
|
+
"allow-unauthenticated": (_e = customConfig === null || customConfig === void 0 ? void 0 : customConfig.allowUnauthenticated) !== null && _e !== void 0 ? _e : true,
|
|
4023
|
+
ingress: (_f = customConfig === null || customConfig === void 0 ? void 0 : customConfig.ingress) !== null && _f !== void 0 ? _f : "all",
|
|
3994
4024
|
"cpu-boost": true,
|
|
3995
4025
|
"execution-environment": customConfig === null || customConfig === void 0 ? void 0 : customConfig.executionEnvironment,
|
|
4026
|
+
gpu: customConfig === null || customConfig === void 0 ? void 0 : customConfig.gpu,
|
|
4027
|
+
"gpu-type": customConfig === null || customConfig === void 0 ? void 0 : customConfig.gpuType,
|
|
4028
|
+
...(0, healthCheck_1.healthCheckCliArgs)(customConfig === null || customConfig === void 0 ? void 0 : customConfig.healthCheck),
|
|
3996
4029
|
}, ...(0, volumes_1.createVolumeConfig)(customConfig === null || customConfig === void 0 ? void 0 : customConfig.volumes, "service"));
|
|
3997
|
-
|
|
4030
|
+
const version = requiresBeta(customConfig) ? "beta" : undefined;
|
|
4031
|
+
return `${(0, common_1.gcloudRunCmd)(version)} deploy ${fullServiceName} ${argsString}`;
|
|
3998
4032
|
};
|
|
3999
4033
|
exports.getServiceDeployScript = getServiceDeployScript;
|
|
4000
4034
|
const getServiceDeleteScript = (context, serviceSuffix) => {
|
|
@@ -4009,6 +4043,21 @@ const getServiceDeleteScript = (context, serviceSuffix) => {
|
|
|
4009
4043
|
];
|
|
4010
4044
|
};
|
|
4011
4045
|
exports.getServiceDeleteScript = getServiceDeleteScript;
|
|
4046
|
+
const requiresBeta = (config) => {
|
|
4047
|
+
if (!config) {
|
|
4048
|
+
return false;
|
|
4049
|
+
}
|
|
4050
|
+
if (config.gpuType) {
|
|
4051
|
+
return true;
|
|
4052
|
+
}
|
|
4053
|
+
if (config.gpu && config.gpu > 0) {
|
|
4054
|
+
return true;
|
|
4055
|
+
}
|
|
4056
|
+
if (config.healthCheck !== undefined) {
|
|
4057
|
+
return true;
|
|
4058
|
+
}
|
|
4059
|
+
return false;
|
|
4060
|
+
};
|
|
4012
4061
|
//# sourceMappingURL=cloudRunServices.js.map
|
|
4013
4062
|
|
|
4014
4063
|
/***/ }),
|
|
@@ -4095,8 +4144,9 @@ exports.ENV_VARS_FILENAME = "____envvars.yaml";
|
|
|
4095
4144
|
"use strict";
|
|
4096
4145
|
|
|
4097
4146
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4098
|
-
exports.
|
|
4147
|
+
exports.getOnDeployExecuteScript = void 0;
|
|
4099
4148
|
const createArgsString_1 = __nccwpck_require__(9598);
|
|
4149
|
+
const getJobOrServiceArgs_1 = __nccwpck_require__(1741);
|
|
4100
4150
|
const jobName_1 = __nccwpck_require__(9626);
|
|
4101
4151
|
const cloudRunJobs_1 = __nccwpck_require__(1224);
|
|
4102
4152
|
const common_1 = __nccwpck_require__(3325);
|
|
@@ -4164,19 +4214,11 @@ const getJobRunScriptForExecute = (context, { jobName, config }) => {
|
|
|
4164
4214
|
const argString = (0, createArgsString_1.createArgsString)({
|
|
4165
4215
|
...commonArgs,
|
|
4166
4216
|
wait: waitForCompletion === true ? true : undefined,
|
|
4167
|
-
args: (0,
|
|
4217
|
+
args: (0, getJobOrServiceArgs_1.getCloudRunServiceOrJobArgsArg)(config.args),
|
|
4168
4218
|
});
|
|
4169
4219
|
const fullJobName = (0, jobName_1.getFullJobName)(context, jobName);
|
|
4170
4220
|
return `${(0, common_1.gcloudRunCmd)()} jobs execute ${fullJobName.toString()} ${argString}`;
|
|
4171
4221
|
};
|
|
4172
|
-
const getCloudRunJobArgsArg = (args) => {
|
|
4173
|
-
return args !== undefined
|
|
4174
|
-
? args.length > 0
|
|
4175
|
-
? args === null || args === void 0 ? void 0 : args.map((arg) => `"${arg}"`).join(",")
|
|
4176
|
-
: ""
|
|
4177
|
-
: undefined;
|
|
4178
|
-
};
|
|
4179
|
-
exports.getCloudRunJobArgsArg = getCloudRunJobArgsArg;
|
|
4180
4222
|
//# sourceMappingURL=onDeploy.js.map
|
|
4181
4223
|
|
|
4182
4224
|
/***/ }),
|
|
@@ -4416,6 +4458,64 @@ exports.getCloudRunStopScripts = getCloudRunStopScripts;
|
|
|
4416
4458
|
|
|
4417
4459
|
/***/ }),
|
|
4418
4460
|
|
|
4461
|
+
/***/ 193:
|
|
4462
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
4463
|
+
|
|
4464
|
+
"use strict";
|
|
4465
|
+
|
|
4466
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4467
|
+
exports.healthCheckCliArgs = void 0;
|
|
4468
|
+
const types_1 = __nccwpck_require__(5781);
|
|
4469
|
+
const PORT = 8080;
|
|
4470
|
+
function healthCheckCliArgs(healthCheck) {
|
|
4471
|
+
const shouldNotSetHealthCheck = healthCheck === undefined;
|
|
4472
|
+
if (shouldNotSetHealthCheck) {
|
|
4473
|
+
return undefined;
|
|
4474
|
+
}
|
|
4475
|
+
const shouldUseDefaultProbe = healthCheck === true;
|
|
4476
|
+
if (shouldUseDefaultProbe) {
|
|
4477
|
+
return {
|
|
4478
|
+
"startup-probe": toArgValue(probeToKeyValuePairs(types_1.defaultStartupProbe)),
|
|
4479
|
+
"liveness-probe": toArgValue(probeToKeyValuePairs(types_1.defaultLivenessProbe)),
|
|
4480
|
+
};
|
|
4481
|
+
}
|
|
4482
|
+
return {
|
|
4483
|
+
"startup-probe": toArgValue(probeToKeyValuePairs(healthCheck.startupProbe)),
|
|
4484
|
+
"liveness-probe": healthCheck.livenessProbe
|
|
4485
|
+
? toArgValue(probeToKeyValuePairs(healthCheck.livenessProbe))
|
|
4486
|
+
: "", // NOTE: empty string ("") removes liveness probe
|
|
4487
|
+
};
|
|
4488
|
+
}
|
|
4489
|
+
exports.healthCheckCliArgs = healthCheckCliArgs;
|
|
4490
|
+
function probeToKeyValuePairs(probe) {
|
|
4491
|
+
const sharedArgs = Object.entries({
|
|
4492
|
+
initialDelaySeconds: probe.initialDelaySeconds,
|
|
4493
|
+
timeoutSeconds: probe.timeoutSeconds,
|
|
4494
|
+
periodSeconds: probe.periodSeconds,
|
|
4495
|
+
failureThreshold: probe.failureThreshold,
|
|
4496
|
+
});
|
|
4497
|
+
switch (probe.type) {
|
|
4498
|
+
case "tcp":
|
|
4499
|
+
return [...sharedArgs, ["tcpSocket.port", PORT]];
|
|
4500
|
+
case "http1":
|
|
4501
|
+
return [
|
|
4502
|
+
...sharedArgs,
|
|
4503
|
+
["httpGet.port", PORT],
|
|
4504
|
+
["httpGet.path", probe.path],
|
|
4505
|
+
// NOTE: headers are not supported by "gcloud beta" at the moment
|
|
4506
|
+
];
|
|
4507
|
+
default:
|
|
4508
|
+
probe;
|
|
4509
|
+
return [];
|
|
4510
|
+
}
|
|
4511
|
+
}
|
|
4512
|
+
function toArgValue(keyValues) {
|
|
4513
|
+
return keyValues.map(([key, value]) => `${key}=${value}`).join(",");
|
|
4514
|
+
}
|
|
4515
|
+
//# sourceMappingURL=healthCheck.js.map
|
|
4516
|
+
|
|
4517
|
+
/***/ }),
|
|
4518
|
+
|
|
4419
4519
|
/***/ 4069:
|
|
4420
4520
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
4421
4521
|
|
|
@@ -4721,6 +4821,25 @@ exports.gcloudServiceAccountLoginCommands = gcloudServiceAccountLoginCommands;
|
|
|
4721
4821
|
|
|
4722
4822
|
/***/ }),
|
|
4723
4823
|
|
|
4824
|
+
/***/ 1741:
|
|
4825
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
4826
|
+
|
|
4827
|
+
"use strict";
|
|
4828
|
+
|
|
4829
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
4830
|
+
exports.getCloudRunServiceOrJobArgsArg = void 0;
|
|
4831
|
+
const getCloudRunServiceOrJobArgsArg = (args) => {
|
|
4832
|
+
return args !== undefined
|
|
4833
|
+
? args.length > 0
|
|
4834
|
+
? args === null || args === void 0 ? void 0 : args.map((arg) => `"${arg}"`).join(",")
|
|
4835
|
+
: ""
|
|
4836
|
+
: undefined;
|
|
4837
|
+
};
|
|
4838
|
+
exports.getCloudRunServiceOrJobArgsArg = getCloudRunServiceOrJobArgsArg;
|
|
4839
|
+
//# sourceMappingURL=getJobOrServiceArgs.js.map
|
|
4840
|
+
|
|
4841
|
+
/***/ }),
|
|
4842
|
+
|
|
4724
4843
|
/***/ 8128:
|
|
4725
4844
|
/***/ ((__unused_webpack_module, exports) => {
|
|
4726
4845
|
|
|
@@ -5263,7 +5382,9 @@ const createAppConfig = (context, application) => {
|
|
|
5263
5382
|
const { healthRoute, command, ...rest } = application !== null && application !== void 0 ? application : {};
|
|
5264
5383
|
return (0, utils_1.mergeWithMergingArrays)({
|
|
5265
5384
|
host: context.environment.envVars.HOSTNAME,
|
|
5266
|
-
command: command !== null && command !== void 0 ? command : context.build.
|
|
5385
|
+
command: command !== null && command !== void 0 ? command : (context.build.type !== "disabled"
|
|
5386
|
+
? context.build.config.startCommand
|
|
5387
|
+
: undefined),
|
|
5267
5388
|
livenessProbe: {
|
|
5268
5389
|
httpGet: {
|
|
5269
5390
|
path: healthRoute !== null && healthRoute !== void 0 ? healthRoute : "__health",
|
|
@@ -5443,9 +5564,10 @@ exports.getDependencyTrackDeleteScript = exports.getDependencyTrackUploadScript
|
|
|
5443
5564
|
const BashExpression_1 = __nccwpck_require__(2376);
|
|
5444
5565
|
const sbom_1 = __nccwpck_require__(7038);
|
|
5445
5566
|
const context_1 = __nccwpck_require__(1724);
|
|
5446
|
-
const sbomDeactivated = (context) =>
|
|
5447
|
-
context
|
|
5448
|
-
|
|
5567
|
+
const sbomDeactivated = (context) => context.build.type === "disabled" ||
|
|
5568
|
+
((0, context_1.componentContextIsStandaloneBuild)(context) &&
|
|
5569
|
+
context.build.config.type === "custom" &&
|
|
5570
|
+
context.build.config.sbom === false);
|
|
5449
5571
|
exports.sbomDeactivated = sbomDeactivated;
|
|
5450
5572
|
const getDependencyTrackUploadScript = (context) => {
|
|
5451
5573
|
return (0, exports.sbomDeactivated)(context)
|
|
@@ -5495,6 +5617,22 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
5495
5617
|
"use strict";
|
|
5496
5618
|
|
|
5497
5619
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5620
|
+
exports.defaultLivenessProbe = exports.defaultStartupProbe = void 0;
|
|
5621
|
+
exports.defaultStartupProbe = {
|
|
5622
|
+
type: "http1",
|
|
5623
|
+
path: "/__health",
|
|
5624
|
+
initialDelaySeconds: 5,
|
|
5625
|
+
timeoutSeconds: 1,
|
|
5626
|
+
periodSeconds: 30,
|
|
5627
|
+
failureThreshold: 3,
|
|
5628
|
+
};
|
|
5629
|
+
exports.defaultLivenessProbe = {
|
|
5630
|
+
...exports.defaultStartupProbe,
|
|
5631
|
+
initialDelaySeconds: 0,
|
|
5632
|
+
timeoutSeconds: 10,
|
|
5633
|
+
periodSeconds: 30,
|
|
5634
|
+
failureThreshold: 3,
|
|
5635
|
+
};
|
|
5498
5636
|
//# sourceMappingURL=googleCloudRun.js.map
|
|
5499
5637
|
|
|
5500
5638
|
/***/ }),
|
|
@@ -5738,7 +5876,9 @@ const getCustomJobs = (context) => {
|
|
|
5738
5876
|
return injectDefaultVarsInCustomJobs(context, rawJobs);
|
|
5739
5877
|
};
|
|
5740
5878
|
const createJobsForComponentContext = (context) => {
|
|
5741
|
-
const buildJobs =
|
|
5879
|
+
const buildJobs = context.build.type !== "disabled"
|
|
5880
|
+
? build_1.BUILD_TYPES[context.build.buildType].jobs(context)
|
|
5881
|
+
: [];
|
|
5742
5882
|
const deployJobs = context.componentConfig.deploy !== false
|
|
5743
5883
|
? deploy_1.DEPLOY_TYPES[context.componentConfig.deploy.type].jobs(context)
|
|
5744
5884
|
: [];
|