@catladder/pipeline 1.146.1 → 1.147.0
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/build/base/createAppBuildJob.d.ts +2 -2
- package/dist/build/base/createAppBuildJob.js +6 -6
- package/dist/build/base/index.d.ts +2 -2
- package/dist/build/base/writeBuildInfo.d.ts +2 -2
- package/dist/build/base/writeBuildInfo.js +1 -1
- package/dist/build/base/writeDotEnv.d.ts +2 -2
- package/dist/build/base/writeDotEnv.js +1 -1
- package/dist/build/custom/__tests__/testJob.test.js +11 -14
- package/dist/build/custom/buildJob.d.ts +2 -2
- package/dist/build/custom/buildJob.js +5 -5
- package/dist/build/custom/index.d.ts +2 -2
- package/dist/build/custom/testJob.d.ts +2 -2
- package/dist/build/custom/testJob.js +5 -5
- package/dist/build/docker.d.ts +32 -15
- package/dist/build/docker.js +41 -20
- package/dist/build/index.d.ts +2 -2
- package/dist/build/node/buildJob.d.ts +2 -2
- package/dist/build/node/buildJob.js +8 -8
- package/dist/build/node/cache.d.ts +5 -5
- package/dist/build/node/cache.js +5 -5
- package/dist/build/node/index.d.ts +4 -4
- package/dist/build/node/meteor.d.ts +2 -2
- package/dist/build/node/meteor.js +6 -6
- package/dist/build/node/testJob.d.ts +2 -2
- package/dist/build/node/testJob.js +11 -11
- package/dist/build/node/yarn.d.ts +4 -4
- package/dist/build/node/yarn.js +1 -1
- package/dist/build/rails/build.d.ts +2 -2
- package/dist/build/rails/build.js +3 -3
- package/dist/build/rails/index.d.ts +2 -2
- package/dist/build/rails/test.d.ts +2 -2
- package/dist/build/rails/test.js +4 -4
- package/dist/build/sbom.d.ts +2 -2
- package/dist/build/sbom.js +2 -2
- package/dist/build/types.d.ts +34 -26
- package/dist/bundles/catladder-gitlab/index.js +2 -2
- package/dist/constants.js +1 -1
- package/dist/context/getEnvironment.d.ts +2 -2
- package/dist/context/getEnvironmentContext.d.ts +2 -2
- package/dist/context/getEnvironmentVariables.d.ts +4 -4
- package/dist/context/getLabels.d.ts +2 -2
- package/dist/context/getLabels.js +1 -1
- package/dist/context/index.d.ts +7 -3
- package/dist/context/index.js +43 -12
- package/dist/deploy/base/deploy.d.ts +2 -2
- package/dist/deploy/base/deploy.js +9 -8
- package/dist/deploy/base/index.d.ts +2 -2
- package/dist/deploy/base/rollback.d.ts +2 -2
- package/dist/deploy/base/stop.d.ts +2 -2
- package/dist/deploy/cloudRun/artifactsRegistry.d.ts +7 -11
- package/dist/deploy/cloudRun/artifactsRegistry.js +8 -9
- package/dist/deploy/cloudRun/cleanup.d.ts +2 -2
- package/dist/deploy/cloudRun/cloudRunRevisions.d.ts +2 -2
- package/dist/deploy/cloudRun/cloudRunRevisions.js +4 -5
- package/dist/deploy/cloudRun/createJobs/cloudRunJobs.d.ts +6 -6
- package/dist/deploy/cloudRun/createJobs/cloudRunServices.d.ts +3 -3
- package/dist/deploy/cloudRun/createJobs/cloudRunServices.js +1 -1
- package/dist/deploy/cloudRun/createJobs/common.js +2 -1
- package/dist/deploy/cloudRun/createJobs/getCloudRunDeployScripts.d.ts +2 -2
- package/dist/deploy/cloudRun/createJobs/getCloudRunStopScripts.d.ts +2 -2
- package/dist/deploy/cloudRun/createJobs/index.d.ts +2 -2
- package/dist/deploy/cloudRun/createJobs/index.js +2 -4
- package/dist/deploy/cloudRun/utils/database.d.ts +3 -3
- package/dist/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.d.ts +2 -2
- package/dist/deploy/cloudRun/utils/getServiceName.d.ts +2 -2
- package/dist/deploy/custom/deployJob.d.ts +2 -2
- package/dist/deploy/custom/deployJob.js +7 -10
- package/dist/deploy/dockerTag/deployJob.d.ts +2 -2
- package/dist/deploy/dockerTag/deployJob.js +3 -5
- package/dist/deploy/index.d.ts +2 -2
- package/dist/deploy/kubernetes/cloudSql/index.d.ts +3 -3
- package/dist/deploy/kubernetes/cloudSql/index.js +11 -9
- package/dist/deploy/kubernetes/deployJob.d.ts +2 -2
- package/dist/deploy/kubernetes/deployJob.js +4 -7
- package/dist/deploy/kubernetes/kubeEnv.d.ts +2 -2
- package/dist/deploy/kubernetes/kubeEnv.js +2 -1
- package/dist/deploy/kubernetes/kubeValues.d.ts +2 -2
- package/dist/deploy/kubernetes/kubeValues.js +10 -10
- package/dist/deploy/kubernetes/mongodb.d.ts +2 -2
- package/dist/deploy/kubernetes/mongodb.js +11 -11
- package/dist/deploy/sbom.d.ts +4 -4
- package/dist/deploy/sbom.js +1 -1
- package/dist/deploy/types/index.d.ts +1 -1
- package/dist/deploy/types/index.js +1 -1
- package/dist/deploy/utils.d.ts +2 -2
- package/dist/deploy/utils.js +2 -1
- package/dist/pipeline/createJobsForComponent.d.ts +2 -2
- package/dist/pipeline/createJobsForComponent.js +6 -6
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/config.d.ts +2 -2
- package/dist/types/context.d.ts +28 -2
- package/examples/__snapshots__/cloud-run-storybook.ts.snap +1687 -0
- package/examples/__snapshots__/cloud-run-with-ngnix.ts.snap +1971 -0
- package/examples/cloud-run-storybook.ts +24 -0
- package/examples/cloud-run-with-ngnix.ts +24 -0
- package/package.json +1 -1
- package/src/build/base/createAppBuildJob.ts +9 -9
- package/src/build/base/index.ts +2 -2
- package/src/build/base/writeBuildInfo.ts +3 -3
- package/src/build/base/writeDotEnv.ts +3 -3
- package/src/build/custom/__tests__/testJob.test.ts +8 -11
- package/src/build/custom/buildJob.ts +10 -11
- package/src/build/custom/index.ts +2 -2
- package/src/build/custom/testJob.ts +9 -7
- package/src/build/docker.ts +73 -29
- package/src/build/index.ts +2 -2
- package/src/build/node/buildJob.ts +19 -15
- package/src/build/node/cache.ts +10 -10
- package/src/build/node/index.ts +6 -4
- package/src/build/node/meteor.ts +16 -17
- package/src/build/node/testJob.ts +19 -16
- package/src/build/node/yarn.ts +6 -8
- package/src/build/rails/build.ts +7 -5
- package/src/build/rails/index.ts +2 -2
- package/src/build/rails/test.ts +8 -6
- package/src/build/sbom.ts +5 -5
- package/src/build/types.ts +53 -38
- package/src/context/getEnvironment.ts +2 -2
- package/src/context/getEnvironmentContext.ts +2 -2
- package/src/context/getEnvironmentVariables.ts +7 -4
- package/src/context/getLabels.ts +3 -3
- package/src/context/index.ts +33 -7
- package/src/deploy/base/deploy.ts +10 -16
- package/src/deploy/base/index.ts +2 -2
- package/src/deploy/base/rollback.ts +2 -2
- package/src/deploy/base/stop.ts +2 -2
- package/src/deploy/cloudRun/artifactsRegistry.ts +16 -16
- package/src/deploy/cloudRun/cleanup.ts +2 -2
- package/src/deploy/cloudRun/cloudRunRevisions.ts +6 -8
- package/src/deploy/cloudRun/createJobs/cloudRunJobs.ts +10 -10
- package/src/deploy/cloudRun/createJobs/cloudRunServices.ts +4 -4
- package/src/deploy/cloudRun/createJobs/common.ts +1 -1
- package/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.ts +5 -2
- package/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.ts +2 -2
- package/src/deploy/cloudRun/createJobs/index.ts +3 -6
- package/src/deploy/cloudRun/utils/database.ts +3 -3
- package/src/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.ts +4 -2
- package/src/deploy/cloudRun/utils/getServiceName.ts +2 -2
- package/src/deploy/custom/deployJob.ts +10 -8
- package/src/deploy/dockerTag/deployJob.ts +6 -7
- package/src/deploy/index.ts +2 -2
- package/src/deploy/kubernetes/cloudSql/index.ts +10 -7
- package/src/deploy/kubernetes/deployJob.ts +3 -6
- package/src/deploy/kubernetes/kubeEnv.ts +3 -3
- package/src/deploy/kubernetes/kubeValues.ts +6 -6
- package/src/deploy/kubernetes/mongodb.ts +14 -14
- package/src/deploy/sbom.ts +9 -6
- package/src/deploy/types/index.ts +2 -2
- package/src/deploy/utils.ts +3 -3
- package/src/pipeline/createJobsForComponent.ts +17 -17
- package/src/pipeline/gitlab/createGitlabJobs.ts +2 -2
- package/src/types/config.ts +4 -2
- package/src/types/context.ts +33 -2
package/dist/constants.js
CHANGED
|
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
7
|
-
exports.PIPELINE_IMAGE_TAG = "v1-
|
|
7
|
+
exports.PIPELINE_IMAGE_TAG = "v1-147-0-f922ca52" || "latest";
|
|
8
8
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || "git.panter.ch:5001/catladder/catladder";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CreateComponentContextContext } from "..";
|
|
2
2
|
import type { Environment } from "../types/context";
|
|
3
|
-
export declare const getEnvironment: (ctx:
|
|
3
|
+
export declare const getEnvironment: (ctx: CreateComponentContextContext) => Promise<Environment>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CreateComponentContextContext } from "..";
|
|
2
2
|
import type { EnvironmentContext } from "../types/environmentContext";
|
|
3
3
|
export declare const getEnvironmentContext: ({
|
|
4
4
|
env,
|
|
5
5
|
componentName,
|
|
6
6
|
config,
|
|
7
7
|
pipelineType
|
|
8
|
-
}:
|
|
8
|
+
}: CreateComponentContextContext) => EnvironmentContext<any, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { ComponentContext, EnvironmentEnvVarPart as EnvironmentVariables } from "../types";
|
|
2
|
+
import type { CreateComponentContextContext } from "..";
|
|
3
3
|
import type { StringOrBashExpression } from "../bash/BashExpression";
|
|
4
4
|
import type { EnvironmentContext } from "../types/environmentContext";
|
|
5
5
|
export type SecretEnvVar = {
|
|
@@ -24,7 +24,7 @@ export type PredefinedVariables = BasePredefinedVariables & {
|
|
|
24
24
|
HOST_INTERNAL: StringOrBashExpression;
|
|
25
25
|
ROOT_URL_INTERNAL: StringOrBashExpression;
|
|
26
26
|
};
|
|
27
|
-
export declare const getEnvironmentVariables: (ctx:
|
|
27
|
+
export declare const getEnvironmentVariables: (ctx: CreateComponentContextContext, alreadyVisited?: Record<string, Record<string, boolean>>) => Promise<EnvironmentVariables>;
|
|
28
28
|
export declare const getSecretVarName: (env: string, componentName: string, key: string) => string;
|
|
29
|
-
export declare const getSecretVarNameForContext: (context:
|
|
29
|
+
export declare const getSecretVarNameForContext: (context: ComponentContext, key: string) => string;
|
|
30
30
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const getLabels: (context:
|
|
1
|
+
import type { ComponentContext } from "../types";
|
|
2
|
+
export declare const getLabels: (context: ComponentContext) => {
|
|
3
3
|
"customer-name": string | undefined;
|
|
4
4
|
"component-name": string | undefined;
|
|
5
5
|
"app-name": string | undefined;
|
|
@@ -34,7 +34,7 @@ var getLabels = function (context) {
|
|
|
34
34
|
"app-name": sanitize(context.fullConfig.appName),
|
|
35
35
|
"env-type": sanitize(context.environment.envType),
|
|
36
36
|
"env-name": sanitize(context.environment.shortName),
|
|
37
|
-
"build-type": sanitize((_a = context.
|
|
37
|
+
"build-type": sanitize((_a = context.build.config) === null || _a === void 0 ? void 0 : _a.type)
|
|
38
38
|
}, (_c = (_b = context.fullConfig.meta) === null || _b === void 0 ? void 0 : _b.labels) !== null && _c !== void 0 ? _c : {});
|
|
39
39
|
return labels;
|
|
40
40
|
};
|
package/dist/context/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { PipelineType } from "../types";
|
|
2
2
|
import type { Config, PipelineTrigger } from "../types/config";
|
|
3
|
-
import type {
|
|
3
|
+
import type { ComponentContext, PackageManagerInfo } from "../types/context";
|
|
4
4
|
export * from "./getEnvironment";
|
|
5
5
|
export * from "./getEnvironmentVariables";
|
|
6
|
-
export type
|
|
6
|
+
export type CreateComponentContextContext = {
|
|
7
7
|
config: Config;
|
|
8
8
|
componentName: string;
|
|
9
9
|
env: string;
|
|
@@ -11,4 +11,8 @@ export type CreateContextContext = {
|
|
|
11
11
|
trigger?: PipelineTrigger;
|
|
12
12
|
packageManagerInfo?: PackageManagerInfo;
|
|
13
13
|
};
|
|
14
|
-
export declare const
|
|
14
|
+
export declare const createComponentContext: (ctx: CreateComponentContextContext) => Promise<ComponentContext>;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated use createComponentContext instead
|
|
17
|
+
*/
|
|
18
|
+
export declare const createContext: (ctx: CreateComponentContextContext) => Promise<ComponentContext>;
|
package/dist/context/index.js
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var __assign = this && this.__assign || function () {
|
|
4
|
+
__assign = Object.assign || function (t) {
|
|
5
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
+
s = arguments[i];
|
|
7
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
3
13
|
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
4
14
|
if (k2 === undefined) k2 = k;
|
|
5
15
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -137,7 +147,8 @@ var __generator = this && this.__generator || function (thisArg, body) {
|
|
|
137
147
|
Object.defineProperty(exports, "__esModule", {
|
|
138
148
|
value: true
|
|
139
149
|
});
|
|
140
|
-
exports.createContext = void 0;
|
|
150
|
+
exports.createContext = exports.createComponentContext = void 0;
|
|
151
|
+
var lodash_1 = require("lodash");
|
|
141
152
|
var build_1 = require("../build");
|
|
142
153
|
var deploy_1 = require("../deploy");
|
|
143
154
|
var utils_1 = require("../utils");
|
|
@@ -145,12 +156,11 @@ var getEnvironment_1 = require("./getEnvironment");
|
|
|
145
156
|
var getEnvironmentContext_1 = require("./getEnvironmentContext");
|
|
146
157
|
__exportStar(require("./getEnvironment"), exports);
|
|
147
158
|
__exportStar(require("./getEnvironmentVariables"), exports);
|
|
148
|
-
var
|
|
159
|
+
var createComponentContext = function (ctx) {
|
|
149
160
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
150
|
-
var envContext, componentConfigWithoutDefaults, defaults, componentConfig;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
switch (_b.label) {
|
|
161
|
+
var envContext, componentConfigWithoutDefaults, defaults, componentConfig, environment, deploy, build, customJobs, dir, context, resolvedCustomJobs;
|
|
162
|
+
return __generator(this, function (_a) {
|
|
163
|
+
switch (_a.label) {
|
|
154
164
|
case 0:
|
|
155
165
|
if (!/^[a-z0-9-]+$/.test(ctx.componentName)) {
|
|
156
166
|
throw new Error("componentName may only contain lower case letters, numbers and -");
|
|
@@ -165,16 +175,37 @@ var createContext = function (ctx) {
|
|
|
165
175
|
deploy: {}
|
|
166
176
|
};
|
|
167
177
|
componentConfig = (0, utils_1.mergeWithMergingArrays)(defaults, componentConfigWithoutDefaults);
|
|
168
|
-
|
|
178
|
+
return [4 /*yield*/, (0, getEnvironment_1.getEnvironment)(ctx)];
|
|
179
|
+
case 1:
|
|
180
|
+
environment = _a.sent();
|
|
181
|
+
deploy = componentConfig.deploy, build = componentConfig.build, customJobs = componentConfig.customJobs, dir = componentConfig.dir;
|
|
182
|
+
context = {
|
|
169
183
|
fullConfig: ctx.config,
|
|
170
184
|
componentConfig: componentConfig,
|
|
171
|
-
|
|
185
|
+
build: {
|
|
186
|
+
dir: dir,
|
|
187
|
+
packageManagerInfo: ctx.packageManagerInfo,
|
|
188
|
+
config: build
|
|
189
|
+
},
|
|
190
|
+
deploy: deploy ? {
|
|
191
|
+
config: deploy
|
|
192
|
+
} : null,
|
|
193
|
+
componentName: ctx.componentName,
|
|
194
|
+
environment: environment,
|
|
195
|
+
packageManagerInfo: ctx.packageManagerInfo,
|
|
196
|
+
pipelineType: ctx.pipelineType,
|
|
197
|
+
trigger: ctx.trigger
|
|
172
198
|
};
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
199
|
+
resolvedCustomJobs = (0, lodash_1.isFunction)(customJobs) ? customJobs(context) : customJobs;
|
|
200
|
+
return [2 /*return*/, __assign(__assign({}, context), {
|
|
201
|
+
customJobs: resolvedCustomJobs
|
|
202
|
+
})];
|
|
176
203
|
}
|
|
177
204
|
});
|
|
178
205
|
});
|
|
179
206
|
};
|
|
180
|
-
exports.
|
|
207
|
+
exports.createComponentContext = createComponentContext;
|
|
208
|
+
/**
|
|
209
|
+
* @deprecated use createComponentContext instead
|
|
210
|
+
*/
|
|
211
|
+
exports.createContext = exports.createComponentContext;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../types/context";
|
|
2
2
|
import type { CatladderJob } from "../../types/jobs";
|
|
3
3
|
export declare const DEPLOY_JOB_NAME = "\uD83D\uDE80 Deploy";
|
|
4
4
|
export type DeployJobDefinition = Pick<CatladderJob, "script" | "variables" | "image" | "cache" | "artifacts" | "services" | "runnerVariables">;
|
|
5
|
-
export declare const createDeployJob: (context:
|
|
5
|
+
export declare const createDeployJob: (context: ComponentContext, jobDefinition: DeployJobDefinition) => CatladderJob;
|
|
@@ -53,15 +53,16 @@ var stop_1 = require("./stop");
|
|
|
53
53
|
var variables_1 = require("./variables");
|
|
54
54
|
exports.DEPLOY_JOB_NAME = "🚀 Deploy";
|
|
55
55
|
var createDeployJob = function (context, jobDefinition) {
|
|
56
|
-
var _a, _b, _c, _d, _e, _f;
|
|
56
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
57
57
|
var hasDocker = (0, docker_1.requiresDockerBuild)(context);
|
|
58
58
|
var isStoppable = (0, utils_1.contextIsStoppable)(context);
|
|
59
59
|
var autoStop = context.environment.envType === "review" ? "1 week" : context.environment.envType === "dev" ? "4 weeks" : undefined;
|
|
60
|
+
var deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
60
61
|
// if auto or manual is configured explicitly, use that
|
|
61
|
-
var whenDeployDefined =
|
|
62
|
+
var whenDeployDefined = deployConfig && deployConfig.when ? deployConfig.when : undefined;
|
|
62
63
|
// otherwise auto deploy if env is not prod. If its prod, deploy automatically if stage is disabled
|
|
63
64
|
var whenDeployDefault = context.environment.envType !== "prod" ? "auto" // is not stage, auto deploy
|
|
64
|
-
: ((
|
|
65
|
+
: ((_b = context.componentConfig.env) === null || _b === void 0 ? void 0 : _b.stage) === false ? "auto" // is prod, but no staging, auto deploy
|
|
65
66
|
: "manual"; // manually deploy
|
|
66
67
|
var whenDeploy = whenDeployDefined ? whenDeployDefined : whenDeployDefault;
|
|
67
68
|
return {
|
|
@@ -76,13 +77,13 @@ var createDeployJob = function (context, jobDefinition) {
|
|
|
76
77
|
needs: __spreadArray(__spreadArray([], __read((0, sbom_2.sbomDeactivated)(context) ? [] : [{
|
|
77
78
|
job: sbom_1.SBOM_BUILD_JOB_NAME,
|
|
78
79
|
artifacts: true
|
|
79
|
-
}]), false), __read(
|
|
80
|
+
}]), false), __read(deployConfig ? (_d = (_c = deployConfig.waitFor) === null || _c === void 0 ? void 0 : _c.map(function (c) {
|
|
80
81
|
return {
|
|
81
82
|
componentName: c,
|
|
82
83
|
job: exports.DEPLOY_JOB_NAME,
|
|
83
84
|
artifacts: false
|
|
84
85
|
};
|
|
85
|
-
})) !== null &&
|
|
86
|
+
})) !== null && _d !== void 0 ? _d : [] : []), false),
|
|
86
87
|
// we don't want to deploy when there is a broken test
|
|
87
88
|
needsStages: [{
|
|
88
89
|
stage: "build",
|
|
@@ -95,13 +96,13 @@ var createDeployJob = function (context, jobDefinition) {
|
|
|
95
96
|
when: whenDeploy === "auto" ? "on_success" : "manual",
|
|
96
97
|
allow_failure: whenDeploy === "manual" ? true : false,
|
|
97
98
|
stage: "deploy",
|
|
98
|
-
variables: __assign(__assign(__assign(__assign(__assign({}, context.environment.envVars), hasDocker ? (0, docker_1.getDockerImageVariables)(context) : {}), context.environment.jobOnlyVars.deploy.envVars),
|
|
99
|
-
runnerVariables: __assign(__assign(__assign({}, variables_1.DEPLOY_RUNNER_VARIABLES), (
|
|
99
|
+
variables: __assign(__assign(__assign(__assign(__assign({}, context.environment.envVars), hasDocker ? (0, docker_1.getDockerImageVariables)(context) : {}), context.environment.jobOnlyVars.deploy.envVars), deployConfig ? (_e = deployConfig.extraVars) !== null && _e !== void 0 ? _e : {} : {}), jobDefinition.variables),
|
|
100
|
+
runnerVariables: __assign(__assign(__assign({}, variables_1.DEPLOY_RUNNER_VARIABLES), (_f = jobDefinition.runnerVariables) !== null && _f !== void 0 ? _f : {}), deployConfig ? (_g = deployConfig.runnerVariables) !== null && _g !== void 0 ? _g : {} : {}),
|
|
100
101
|
environment: isStoppable ? {
|
|
101
102
|
on_stop: stop_1.STOP_JOB_NAME,
|
|
102
103
|
auto_stop_in: autoStop
|
|
103
104
|
} : undefined,
|
|
104
|
-
jobTags:
|
|
105
|
+
jobTags: deployConfig ? deployConfig.jobTags : undefined
|
|
105
106
|
};
|
|
106
107
|
};
|
|
107
108
|
exports.createDeployJob = createDeployJob;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../types/context";
|
|
2
2
|
import type { CatladderJob } from "../../types/jobs";
|
|
3
3
|
import { type DeployJobDefinition } from "./deploy";
|
|
4
4
|
import { type RollbackJobDefinition } from "./rollback";
|
|
5
5
|
import { type StopJobDefinition } from "./stop";
|
|
6
|
-
export declare const createDeployementJobs: (context:
|
|
6
|
+
export declare const createDeployementJobs: (context: ComponentContext, definitions: {
|
|
7
7
|
deploy: DeployJobDefinition;
|
|
8
8
|
stop?: StopJobDefinition;
|
|
9
9
|
rollback?: RollbackJobDefinition;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../types/context";
|
|
2
2
|
import type { CatladderJob } from "../../types/jobs";
|
|
3
3
|
export declare const ROLLBACK_JOB_NAME = "\u21A9\uFE0F Rollback \u26A0\uFE0F";
|
|
4
4
|
export type RollbackJobDefinition = Pick<CatladderJob, "script" | "variables" | "runnerVariables" | "image">;
|
|
5
|
-
export declare const createRollbackJob: (context:
|
|
5
|
+
export declare const createRollbackJob: (context: ComponentContext, jobDefinition: RollbackJobDefinition) => CatladderJob;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../types/context";
|
|
2
2
|
import type { CatladderJob } from "../../types/jobs";
|
|
3
3
|
export declare const STOP_JOB_NAME = "\uD83D\uDED1 Stop \u26A0\uFE0F";
|
|
4
4
|
export type StopJobDefinition = Pick<CatladderJob, "script" | "variables" | "image" | "runnerVariables">;
|
|
5
|
-
export declare const createStopJob: (context:
|
|
5
|
+
export declare const createStopJob: (context: ComponentContext, jobDefinition: StopJobDefinition) => CatladderJob;
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import type { StringOrBashExpression } from "../../bash/BashExpression";
|
|
2
|
-
import type {
|
|
3
|
-
export declare const getArtifactsRegistryHost: (
|
|
4
|
-
|
|
5
|
-
deploy
|
|
6
|
-
}
|
|
7
|
-
}: Context) => string;
|
|
8
|
-
export declare const getArtifactsRegistryDockerUrl: (context: Context) => string;
|
|
2
|
+
import type { ComponentContext } from "../../types/context";
|
|
3
|
+
export declare const getArtifactsRegistryHost: (context: ComponentContext) => string;
|
|
4
|
+
export declare const getArtifactsRegistryDockerUrl: (context: ComponentContext) => string;
|
|
9
5
|
/**
|
|
10
6
|
*
|
|
11
7
|
* 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
|
|
12
8
|
*/
|
|
13
|
-
export declare const getArtifactsRegistryImageName: (context:
|
|
14
|
-
export declare const getArtifactsRegistryBuildCacheImage: (context:
|
|
15
|
-
export declare const getArtifactsRegistryImage: (context:
|
|
9
|
+
export declare const getArtifactsRegistryImageName: (context: ComponentContext, lecacyReviewImageName?: boolean) => StringOrBashExpression;
|
|
10
|
+
export declare const getArtifactsRegistryBuildCacheImage: (context: ComponentContext) => string;
|
|
11
|
+
export declare const getArtifactsRegistryImage: (context: ComponentContext) => string;
|
|
16
12
|
/**
|
|
17
13
|
* commands to delete unused images.
|
|
18
14
|
*
|
|
@@ -20,4 +16,4 @@ export declare const getArtifactsRegistryImage: (context: Context) => string;
|
|
|
20
16
|
* @param keep how many of the newest images to keep
|
|
21
17
|
* @returns
|
|
22
18
|
*/
|
|
23
|
-
export declare const getDeleteUnusedImagesCommands: (context:
|
|
19
|
+
export declare const getDeleteUnusedImagesCommands: (context: ComponentContext, keep?: number) => string[];
|
|
@@ -39,17 +39,18 @@ var BashExpression_1 = require("../../bash/BashExpression");
|
|
|
39
39
|
var gitlab_1 = require("../../utils/gitlab");
|
|
40
40
|
var types_1 = require("../types");
|
|
41
41
|
var removeFirstLinesFromCommandOutput_1 = require("./utils/removeFirstLinesFromCommandOutput");
|
|
42
|
-
var getArtifactsRegistryHost = function (
|
|
43
|
-
var
|
|
44
|
-
if (!(0, types_1.isOfDeployType)(deploy, "google-cloudrun")) {
|
|
42
|
+
var getArtifactsRegistryHost = function (context) {
|
|
43
|
+
var _a;
|
|
44
|
+
if (!(0, types_1.isOfDeployType)((_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config, "google-cloudrun")) {
|
|
45
45
|
// should not happen
|
|
46
46
|
throw new Error("deploy config is wrong");
|
|
47
47
|
}
|
|
48
|
-
return "".concat(deploy.region, "-docker.pkg.dev");
|
|
48
|
+
return "".concat(context.deploy.config.region, "-docker.pkg.dev");
|
|
49
49
|
};
|
|
50
50
|
exports.getArtifactsRegistryHost = getArtifactsRegistryHost;
|
|
51
51
|
var getArtifactsRegistryDockerUrl = function (context) {
|
|
52
|
-
var
|
|
52
|
+
var _a;
|
|
53
|
+
var deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
53
54
|
if (!(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
|
|
54
55
|
// should not happen
|
|
55
56
|
throw new Error("deploy config is wrong");
|
|
@@ -108,13 +109,11 @@ var getDeleteImageCommands = function (fullImageName, keepNewest) {
|
|
|
108
109
|
* @returns
|
|
109
110
|
*/
|
|
110
111
|
var getDeleteUnusedImagesCommands = function (context, keep) {
|
|
112
|
+
var _a;
|
|
111
113
|
if (keep === void 0) {
|
|
112
114
|
keep = 0;
|
|
113
115
|
}
|
|
114
|
-
var deployConfig = context.
|
|
115
|
-
if (deployConfig === false) {
|
|
116
|
-
return [];
|
|
117
|
-
}
|
|
116
|
+
var deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
118
117
|
if (!(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
|
|
119
118
|
// should not happen
|
|
120
119
|
throw new Error("deploy config is wrong");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const getRemoveOldRevisionsAndImagesCommand: (context:
|
|
1
|
+
import type { ComponentContext } from "../../types/context";
|
|
2
|
+
export declare const getRemoveOldRevisionsAndImagesCommand: (context: ComponentContext, when: "postDeploy" | "onStop") => string[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const getDeleteUnusedRevisionsCommands: (context:
|
|
1
|
+
import type { ComponentContext } from "../../types/context";
|
|
2
|
+
export declare const getDeleteUnusedRevisionsCommands: (context: ComponentContext, keep: number) => string[];
|
|
@@ -19,8 +19,9 @@ var createArgsString_1 = require("./utils/createArgsString");
|
|
|
19
19
|
var getServiceName_1 = require("./utils/getServiceName");
|
|
20
20
|
var removeFirstLinesFromCommandOutput_1 = require("./utils/removeFirstLinesFromCommandOutput");
|
|
21
21
|
var getListRevisionsCommand = function (context, args) {
|
|
22
|
+
var _a;
|
|
22
23
|
var serviceName = (0, getServiceName_1.getServiceName)(context);
|
|
23
|
-
var deployConfig = context.
|
|
24
|
+
var deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
24
25
|
if (!deployConfig || !(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
|
|
25
26
|
// should not happen
|
|
26
27
|
throw new Error("deploy config is wrong");
|
|
@@ -37,10 +38,8 @@ var getListRevisionsCommand = function (context, args) {
|
|
|
37
38
|
return "gcloud run revisions list ".concat((0, createArgsString_1.createArgsString)(filterRevisionArgs));
|
|
38
39
|
};
|
|
39
40
|
var getDeleteUnusedRevisionsCommands = function (context, keep) {
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
return [];
|
|
43
|
-
}
|
|
41
|
+
var _a;
|
|
42
|
+
var deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
44
43
|
if (!(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
|
|
45
44
|
// should not happen
|
|
46
45
|
throw new Error("deploy config is wrong");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../../types/context";
|
|
2
2
|
import type { DeployConfigCloudRunJob } from "../../types/googleCloudRun";
|
|
3
|
-
export declare const getDeleteSchedulesScripts: (context:
|
|
4
|
-
export declare const getDeleteJobsScripts: (context:
|
|
5
|
-
export declare const getJobRunScripts: (context:
|
|
6
|
-
export declare const getJobCreateScripts: (context:
|
|
7
|
-
export declare const getCreateScheduleScripts: (context:
|
|
3
|
+
export declare const getDeleteSchedulesScripts: (context: ComponentContext) => string[];
|
|
4
|
+
export declare const getDeleteJobsScripts: (context: ComponentContext) => string[];
|
|
5
|
+
export declare const getJobRunScripts: (context: ComponentContext, when: DeployConfigCloudRunJob["when"]) => string[];
|
|
6
|
+
export declare const getJobCreateScripts: (context: ComponentContext) => string[];
|
|
7
|
+
export declare const getCreateScheduleScripts: (context: ComponentContext) => string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../../types/context";
|
|
2
2
|
import type { DeployConfigCloudRunService } from "../../types/googleCloudRun";
|
|
3
|
-
export declare const getServiceDeployScript: (context:
|
|
4
|
-
export declare const getServiceDeleteScript: (context:
|
|
3
|
+
export declare const getServiceDeployScript: (context: ComponentContext, service: DeployConfigCloudRunService | true | undefined, nameSuffix?: string) => string;
|
|
4
|
+
export declare const getServiceDeleteScript: (context: ComponentContext, serviceSuffix?: string) => string[];
|
|
@@ -56,7 +56,7 @@ var getServiceDeployScript = function (context, service, nameSuffix) {
|
|
|
56
56
|
var commonDeployArgs = (0, common_1.getCommonDeployArgs)(context);
|
|
57
57
|
var serviceName = (0, getServiceName_1.getServiceName)(context);
|
|
58
58
|
var customConfig = service !== true ? service : undefined;
|
|
59
|
-
var command = service !== true ? (_a = service === null || service === void 0 ? void 0 : service.command) !== null && _a !== void 0 ? _a : context.
|
|
59
|
+
var command = service !== true ? (_a = service === null || service === void 0 ? void 0 : service.command) !== null && _a !== void 0 ? _a : context.build.config.startCommand : undefined;
|
|
60
60
|
var commandArray = command ? Array.isArray(command) ? command : command.split(" ") : undefined;
|
|
61
61
|
var fullServiceName = serviceName.concat(nameSuffix !== null && nameSuffix !== void 0 ? nameSuffix : "");
|
|
62
62
|
var argsString = createArgsString_1.createArgsString.apply(void 0, __spreadArray([__assign(__assign({
|
|
@@ -64,7 +64,8 @@ var makeLabelString = function (obj) {
|
|
|
64
64
|
};
|
|
65
65
|
exports.makeLabelString = makeLabelString;
|
|
66
66
|
var getCloudRunDeployConfig = function (context) {
|
|
67
|
-
var
|
|
67
|
+
var _a;
|
|
68
|
+
var deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
68
69
|
if (!(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
|
|
69
70
|
// should not happen
|
|
70
71
|
throw new Error("deploy config is wrong");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function getCloudRunDeployScripts(context:
|
|
1
|
+
import type { ComponentContext } from "../../../types/context";
|
|
2
|
+
export declare function getCloudRunDeployScripts(context: ComponentContext): string[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function getCloudRunStopScripts(context:
|
|
1
|
+
import type { ComponentContext } from "../../../types/context";
|
|
2
|
+
export declare function getCloudRunStopScripts(context: ComponentContext): string[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../../types/context";
|
|
2
2
|
import type { CatladderJob } from "../../../types/jobs";
|
|
3
|
-
export declare const createGoogleCloudRunDeployJobs: (context:
|
|
3
|
+
export declare const createGoogleCloudRunDeployJobs: (context: ComponentContext) => CatladderJob[];
|
|
@@ -22,10 +22,8 @@ var constants_1 = require("./constants");
|
|
|
22
22
|
var getCloudRunDeployScripts_1 = require("./getCloudRunDeployScripts");
|
|
23
23
|
var getCloudRunStopScripts_1 = require("./getCloudRunStopScripts");
|
|
24
24
|
var createGoogleCloudRunDeployJobs = function (context) {
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
return [];
|
|
28
|
-
}
|
|
25
|
+
var _a;
|
|
26
|
+
var deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
29
27
|
if (!(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
|
|
30
28
|
// should not happen
|
|
31
29
|
throw new Error("deploy config is wrong");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../../types";
|
|
2
2
|
import type { DeployConfigCloudRun, DeployConfigCloudRunCloudSql } from "../../types";
|
|
3
|
-
export declare const getDatabaseDeleteScript: (context:
|
|
4
|
-
export declare const getDatabaseCreateScript: (context:
|
|
3
|
+
export declare const getDatabaseDeleteScript: (context: ComponentContext, deployConfig: DeployConfigCloudRun) => string[];
|
|
4
|
+
export declare const getDatabaseCreateScript: (context: ComponentContext, deployConfig: DeployConfigCloudRun) => string[];
|
|
5
5
|
export declare const DATABASE_JDBC_URL = "jdbc:postgresql:///$DB_NAME?cloudSqlInstance=$CLOUD_SQL_INSTANCE_CONNECTION_NAME&socketFactory=com.google.cloud.sql.postgres.SocketFactory&user=$DB_USER&password=$DB_PASSWORD";
|
|
6
6
|
export declare const getDatabaseConnectionString: (config: DeployConfigCloudRunCloudSql) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const gcloudServiceAccountLoginCommands: (context:
|
|
1
|
+
import type { ComponentContext } from "../../../types";
|
|
2
|
+
export declare const gcloudServiceAccountLoginCommands: (context: ComponentContext) => string[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const getServiceName: (context:
|
|
1
|
+
import type { ComponentContext } from "../../../types/context";
|
|
2
|
+
export declare const getServiceName: (context: ComponentContext) => string | import("../../../bash/BashExpression").BashExpression;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../types/context";
|
|
2
2
|
import type { CatladderJob } from "../../types/jobs";
|
|
3
|
-
export declare const createCustomDeployJobs: (context:
|
|
3
|
+
export declare const createCustomDeployJobs: (context: ComponentContext) => CatladderJob[];
|
|
@@ -41,28 +41,25 @@ var base_1 = require("../base");
|
|
|
41
41
|
var sbom_1 = require("../sbom");
|
|
42
42
|
var types_1 = require("../types");
|
|
43
43
|
var createCustomDeployJobs = function (context) {
|
|
44
|
-
var _a, _b, _c;
|
|
45
|
-
var deployConfig = context.
|
|
46
|
-
if (deployConfig === false) {
|
|
47
|
-
return [];
|
|
48
|
-
}
|
|
44
|
+
var _a, _b, _c, _d;
|
|
45
|
+
var deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
49
46
|
if (!(0, types_1.isOfDeployType)(deployConfig, "custom")) {
|
|
50
47
|
// should not happen
|
|
51
48
|
throw new Error("deploy config is not custom");
|
|
52
49
|
}
|
|
53
50
|
// FIXME: custom deploy currently assumes yarn-based project
|
|
54
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context, {
|
|
51
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context.build, {
|
|
55
52
|
noCustomPostInstall: true
|
|
56
53
|
});
|
|
57
54
|
return (0, base_1.createDeployementJobs)(context, {
|
|
58
55
|
deploy: {
|
|
59
|
-
image: (
|
|
60
|
-
cache: (
|
|
61
|
-
script: __spreadArray(__spreadArray(__spreadArray(["cd ".concat(context.
|
|
56
|
+
image: (_b = deployConfig.jobImage) !== null && _b !== void 0 ? _b : (0, runner_1.getRunnerImage)("jobs-default"),
|
|
57
|
+
cache: (_c = deployConfig.jobCache) !== null && _c !== void 0 ? _c : [],
|
|
58
|
+
script: __spreadArray(__spreadArray(__spreadArray(["cd ".concat(context.build.dir)], __read(deployConfig.requiresYarnInstall ? yarnInstall : []), false), __read(deployConfig.script), false), __read((0, sbom_1.getDependencyTrackUploadScript)(context)), false),
|
|
62
59
|
variables: {}
|
|
63
60
|
},
|
|
64
61
|
stop: deployConfig.stopScript ? {
|
|
65
|
-
image: (
|
|
62
|
+
image: (_d = deployConfig.jobImage) !== null && _d !== void 0 ? _d : (0, runner_1.getRunnerImage)("jobs-default"),
|
|
66
63
|
script: __spreadArray(__spreadArray([], __read(deployConfig.stopScript), false), __read((0, sbom_1.getDependencyTrackDeleteScript)(context)), false),
|
|
67
64
|
variables: {}
|
|
68
65
|
} : undefined
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../types/context";
|
|
2
2
|
import type { CatladderJob } from "../../types/jobs";
|
|
3
|
-
export declare const createDockerTagDeployJobs: (context:
|
|
3
|
+
export declare const createDockerTagDeployJobs: (context: ComponentContext) => CatladderJob[];
|
|
@@ -49,17 +49,15 @@ var docker_1 = require("../../build/docker");
|
|
|
49
49
|
var base_1 = require("../base");
|
|
50
50
|
var types_1 = require("../types");
|
|
51
51
|
var createDockerTagDeployJobs = function (context) {
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
return [];
|
|
55
|
-
}
|
|
52
|
+
var _a;
|
|
53
|
+
var deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
56
54
|
if (!(0, types_1.isOfDeployType)(deployConfig, "dockerTag")) {
|
|
57
55
|
// should not happen
|
|
58
56
|
throw new Error("deploy config is not dockerTag");
|
|
59
57
|
}
|
|
60
58
|
var tag = deployConfig.tag;
|
|
61
59
|
return (0, base_1.createDeployementJobs)(context, {
|
|
62
|
-
deploy: __assign(__assign({}, (0, docker_1.getDockerJobBaseProps)(
|
|
60
|
+
deploy: __assign(__assign({}, (0, docker_1.getDockerJobBaseProps)()), {
|
|
63
61
|
script: __spreadArray(__spreadArray([], __read((0, docker_1.gitlabDockerLogin)(context)), false), ["docker pull $DOCKER_IMAGE:$DOCKER_IMAGE_TAG", "docker tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG $DOCKER_IMAGE:".concat(tag), "docker push $DOCKER_IMAGE:".concat(tag), "echo \"pushed as $DOCKER_IMAGE:".concat(tag, "\"")], false)
|
|
64
62
|
})
|
|
65
63
|
});
|
package/dist/deploy/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SecretEnvVar } from "..";
|
|
2
2
|
import type { BashExpression } from "../bash/BashExpression";
|
|
3
|
-
import type {
|
|
3
|
+
import type { ComponentContext } from "../types/context";
|
|
4
4
|
import type { EnvironmentContext } from "../types/environmentContext";
|
|
5
5
|
import type { CatladderJob } from "../types/jobs";
|
|
6
6
|
import type { PartialDeep } from "../types/utils";
|
|
@@ -10,7 +10,7 @@ export * from "./kubernetes";
|
|
|
10
10
|
export * from "./types";
|
|
11
11
|
export * from "./utils";
|
|
12
12
|
export type DeployTypeDefinition<T extends DeployConfigType> = {
|
|
13
|
-
jobs: (context:
|
|
13
|
+
jobs: (context: ComponentContext) => CatladderJob[];
|
|
14
14
|
defaults: (envContext: EnvironmentContext<any, T>) => PartialDeep<DeployConfigGeneric<T>>;
|
|
15
15
|
additionalSecretKeys: (envContext: EnvironmentContext<any, T>) => SecretEnvVar[];
|
|
16
16
|
getAdditionalEnvVars: (envContext: EnvironmentContext<any, T>) => Record<string, string | BashExpression | undefined | null>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { StringOrBashExpression } from "../../../bash/BashExpression";
|
|
2
|
-
import type {
|
|
3
|
-
export declare const hasKubernetesCloudSQL: (context:
|
|
2
|
+
import type { ComponentContext } from "../../../types";
|
|
3
|
+
export declare const hasKubernetesCloudSQL: (context: ComponentContext) => boolean | undefined;
|
|
4
4
|
type CloudSqlValues = {
|
|
5
5
|
enabled: boolean;
|
|
6
6
|
proxyCredentials: string;
|
|
@@ -8,7 +8,7 @@ type CloudSqlValues = {
|
|
|
8
8
|
fullDbName: StringOrBashExpression;
|
|
9
9
|
dbUser: string;
|
|
10
10
|
};
|
|
11
|
-
export declare const createKubernetesCloudsqlBaseValues: (context:
|
|
11
|
+
export declare const createKubernetesCloudsqlBaseValues: (context: ComponentContext) => {
|
|
12
12
|
cloudsql: CloudSqlValues;
|
|
13
13
|
};
|
|
14
14
|
export {};
|