@catladder/pipeline 0.0.0-node16-ddfae617 → 0.0.0-prettier-cbceeed9
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/bin/catladder-gitlab-dev.js +3 -0
- package/bin/catladder-gitlab.js +1 -1
- package/dist/build/base/createBuildJob.d.ts +2 -2
- package/dist/build/base/createBuildJob.js +15 -30
- package/dist/build/base/writeBuildInfo.d.ts +2 -0
- package/dist/build/base/{getBuildInfo.js → writeBuildInfo.js} +3 -6
- package/dist/build/custom/buildJob.d.ts +3 -0
- package/dist/build/custom/buildJob.js +83 -0
- package/dist/build/custom/index.d.ts +3 -0
- package/dist/build/custom/index.js +40 -0
- package/dist/build/docker.d.ts +33 -9
- package/dist/build/docker.js +51 -54
- package/dist/build/index.d.ts +6 -5
- package/dist/build/index.js +20 -6
- package/dist/build/node/buildJob.d.ts +2 -2
- package/dist/build/node/buildJob.js +3 -25
- package/dist/build/node/cache.d.ts +2 -2
- package/dist/build/node/cache.js +19 -22
- package/dist/build/node/index.d.ts +1 -1
- package/dist/build/node/index.js +3 -16
- package/dist/build/node/meteor.d.ts +1 -1
- package/dist/build/node/meteor.js +9 -20
- package/dist/build/node/testJob.d.ts +2 -2
- package/dist/build/node/testJob.js +7 -21
- package/dist/build/node/yarn.d.ts +1 -1
- package/dist/build/node/yarn.js +14 -15
- package/dist/build/rails/build.d.ts +3 -0
- package/dist/build/rails/build.js +51 -0
- package/dist/build/rails/index.d.ts +3 -0
- package/dist/build/rails/index.js +41 -0
- package/dist/build/rails/test.d.ts +3 -0
- package/dist/build/rails/test.js +94 -0
- package/dist/build/types.d.ts +84 -9
- package/dist/build/types.js +0 -4
- package/dist/bundles/catladder-gitlab/index.js +32979 -0
- package/dist/catladder-gitlab.js +7 -26
- package/dist/config/{configruedEnvs.test.d.ts → __tests__/configruedEnvs.test.d.ts} +0 -0
- package/dist/config/{configruedEnvs.test.js → __tests__/configruedEnvs.test.js} +10 -12
- package/dist/config/configruedEnvs.d.ts +1 -1
- package/dist/config/configruedEnvs.js +7 -22
- package/dist/config/index.js +0 -4
- package/dist/config/readConfig.d.ts +1 -1
- package/dist/config/readConfig.js +2 -13
- package/dist/constants.js +1 -1
- package/dist/context/{resolveReferences.test.d.ts → __tests__/resolveReferences.test.d.ts} +0 -0
- package/dist/context/__tests__/resolveReferences.test.js +336 -0
- package/dist/context/getEnvConfig.d.ts +2 -0
- package/dist/context/getEnvConfig.js +18 -0
- package/dist/context/getEnvType.d.ts +4 -0
- package/dist/context/getEnvType.js +13 -0
- package/dist/context/getEnvironment.d.ts +3 -0
- package/dist/{pipeline/createChildPipeline.test.js → context/getEnvironment.js} +42 -84
- package/dist/context/getEnvironmentContext.d.ts +4 -0
- package/dist/context/getEnvironmentContext.js +33 -0
- package/dist/context/getEnvironmentVariables.d.ts +10 -0
- package/dist/context/getEnvironmentVariables.js +260 -0
- package/dist/context/getLabels.d.ts +8 -0
- package/dist/context/getLabels.js +38 -0
- package/dist/context/index.d.ts +5 -6
- package/dist/context/index.js +158 -208
- package/dist/context/resolveReferences.d.ts +1 -3
- package/dist/context/resolveReferences.js +213 -52
- package/dist/defaults/index.d.ts +1 -1
- package/dist/deploy/base.d.ts +4 -2
- package/dist/deploy/base.js +38 -33
- package/dist/deploy/cloudRun/deployJob.d.ts +3 -0
- package/dist/deploy/cloudRun/deployJob.js +238 -0
- package/dist/deploy/cloudRun/index.d.ts +4 -0
- package/dist/deploy/cloudRun/index.js +112 -0
- package/dist/deploy/cloudRun/utils/createArgsString.d.ts +11 -0
- package/dist/deploy/cloudRun/utils/createArgsString.js +55 -0
- package/dist/deploy/cloudRun/utils/database.d.ts +4 -0
- package/dist/deploy/cloudRun/utils/database.js +64 -0
- package/dist/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.d.ts +2 -0
- package/dist/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.js +10 -0
- package/dist/deploy/cloudRun/utils/jobName.d.ts +1 -0
- package/dist/deploy/cloudRun/utils/jobName.js +8 -0
- package/dist/deploy/custom/deployJob.d.ts +2 -2
- package/dist/deploy/custom/deployJob.js +10 -16
- package/dist/deploy/custom/index.d.ts +2 -1
- package/dist/deploy/custom/index.js +14 -19
- package/dist/deploy/dockerTag/deployJob.d.ts +3 -0
- package/dist/deploy/dockerTag/deployJob.js +24 -0
- package/dist/deploy/dockerTag/index.d.ts +2 -0
- package/dist/deploy/dockerTag/index.js +17 -0
- package/dist/deploy/index.d.ts +12 -8
- package/dist/deploy/index.js +7 -20
- package/dist/deploy/kubernetes/additionalSecretKeys.d.ts +4 -0
- package/dist/deploy/kubernetes/additionalSecretKeys.js +24 -0
- package/dist/deploy/kubernetes/cloudSql/index.d.ts +13 -0
- package/dist/deploy/kubernetes/cloudSql/index.js +30 -0
- package/dist/deploy/kubernetes/deployJob.d.ts +2 -2
- package/dist/deploy/kubernetes/deployJob.js +17 -91
- package/dist/deploy/kubernetes/index.d.ts +3 -1
- package/dist/deploy/kubernetes/index.js +42 -4
- package/dist/deploy/kubernetes/kubeEnv.d.ts +9 -0
- package/dist/deploy/kubernetes/kubeEnv.js +72 -0
- package/dist/deploy/kubernetes/kubeValues.d.ts +97 -0
- package/dist/deploy/kubernetes/kubeValues.js +124 -0
- package/dist/deploy/kubernetes/mongodb.d.ts +18 -5
- package/dist/deploy/kubernetes/mongodb.js +96 -10
- package/dist/deploy/kubernetes/processSecretsAsFiles.d.ts +25 -21
- package/dist/deploy/kubernetes/processSecretsAsFiles.js +2 -10
- package/dist/deploy/types/base.d.ts +14 -0
- package/dist/deploy/types/base.js +3 -0
- package/dist/deploy/types/custom.d.ts +33 -0
- package/dist/deploy/types/custom.js +3 -0
- package/dist/deploy/types/dockerTag.d.ts +10 -0
- package/dist/deploy/types/dockerTag.js +3 -0
- package/dist/deploy/types/googleCloudRun.d.ts +121 -0
- package/dist/deploy/types/googleCloudRun.js +3 -0
- package/dist/deploy/types/index.d.ts +22 -0
- package/dist/deploy/types/index.js +31 -0
- package/dist/deploy/types/kubernetes.d.ts +276 -0
- package/dist/deploy/types/kubernetes.js +3 -0
- package/dist/deploy/utils.d.ts +2 -2
- package/dist/deploy/utils.js +3 -10
- package/dist/index.js +0 -10
- package/dist/pipeline/commitInfo/getBuildId.d.ts +1 -0
- package/dist/pipeline/commitInfo/getBuildId.js +135 -0
- package/dist/pipeline/commitInfo/getCommitInfo.d.ts +2 -0
- package/dist/pipeline/commitInfo/getCommitInfo.js +140 -0
- package/dist/pipeline/createAllJobs.d.ts +8 -0
- package/dist/{build/tests/storybook.test.js → pipeline/createAllJobs.js} +54 -104
- package/dist/pipeline/createChildPipeline.d.ts +2 -2
- package/dist/pipeline/createChildPipeline.js +40 -121
- package/dist/pipeline/createJobsForComponent.d.ts +3 -0
- package/dist/pipeline/{createJobs.js → createJobsForComponent.js} +33 -192
- package/dist/pipeline/gitlab/createGitlabJobs.d.ts +14 -0
- package/dist/pipeline/gitlab/createGitlabJobs.js +260 -0
- package/dist/pipeline/index.d.ts +1 -1
- package/dist/pipeline/index.js +1 -5
- package/dist/pipeline/packageManager.d.ts +1 -1
- package/dist/pipeline/packageManager.js +20 -173
- package/dist/pipeline/yarn/yarnUtils.d.ts +4 -0
- package/dist/pipeline/yarn/yarnUtils.js +193 -0
- package/dist/rules/index.d.ts +3 -1
- package/dist/rules/index.js +7 -6
- package/dist/runner/index.d.ts +2 -3
- package/dist/runner/index.js +0 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/config.d.ts +19 -25
- package/dist/types/config.js +6 -16
- package/dist/types/context.d.ts +16 -3
- package/dist/types/environmentContext.d.ts +28 -0
- package/dist/types/environmentContext.js +3 -0
- package/dist/types/gitlab-types.d.ts +39 -7
- package/dist/types/index.js +0 -6
- package/dist/types/jobs.d.ts +25 -17
- package/dist/types/jobs.js +1 -1
- package/dist/types/pipeline.d.ts +1 -1
- package/dist/types/utils.d.ts +1 -0
- package/dist/types/utils.js +3 -0
- package/dist/utils/gitlab.d.ts +5 -0
- package/dist/utils/gitlab.js +48 -0
- package/dist/utils/index.js +5 -15
- package/examples/__snapshots__/cloud-run-memory-limit.ts.snap +1560 -0
- package/examples/__snapshots__/cloud-run-no-cpu-throttling.ts.snap +1560 -0
- package/examples/__snapshots__/cloud-run-non-public.ts.snap +1560 -0
- package/examples/__snapshots__/cloud-run-with-sql-reuse-db.ts.snap +3092 -0
- package/examples/__snapshots__/cloud-run-with-sql.ts.snap +3103 -0
- package/examples/__snapshots__/custom-build-job.ts.snap +1162 -0
- package/examples/__snapshots__/custom-envs.ts.snap +261 -0
- package/examples/__snapshots__/kubernetes-application-customization.ts.snap +2280 -0
- package/examples/__snapshots__/kubernetes-with-jobs.ts.snap +4077 -0
- package/examples/__snapshots__/rails-k8s-with-worker.ts.snap +1911 -0
- package/examples/__snapshots__/wait-for-other-deploy.ts.snap +1626 -0
- package/examples/__utils__/helpers.ts +14 -0
- package/examples/cloud-run-memory-limit.ts +28 -0
- package/examples/cloud-run-no-cpu-throttling.ts +33 -0
- package/examples/cloud-run-non-public.ts +27 -0
- package/examples/cloud-run-with-sql-reuse-db.ts +54 -0
- package/examples/cloud-run-with-sql.ts +61 -0
- package/examples/custom-build-job.ts +28 -0
- package/examples/custom-envs.ts +31 -0
- package/examples/kubernetes-application-customization.ts +57 -0
- package/examples/kubernetes-with-jobs.ts +68 -0
- package/examples/rails-k8s-with-worker.ts +95 -0
- package/examples/wait-for-other-deploy.ts +36 -0
- package/package.json +16 -13
- package/scripts/bundle +2 -0
- package/src/build/base/createBuildJob.ts +12 -5
- package/src/build/base/{getBuildInfo.ts → writeBuildInfo.ts} +2 -2
- package/src/build/custom/buildJob.ts +64 -0
- package/src/build/custom/index.ts +7 -0
- package/src/build/docker.ts +58 -33
- package/src/build/index.ts +24 -5
- package/src/build/node/buildJob.ts +2 -2
- package/src/build/node/cache.ts +19 -8
- package/src/build/node/index.ts +1 -1
- package/src/build/node/meteor.ts +8 -2
- package/src/build/node/testJob.ts +4 -2
- package/src/build/node/yarn.ts +21 -10
- package/src/build/rails/build.ts +38 -0
- package/src/build/rails/index.ts +8 -0
- package/src/build/rails/test.ts +86 -0
- package/src/build/types.ts +97 -2
- package/src/catladder-gitlab.ts +4 -2
- package/src/config/{configruedEnvs.test.ts → __tests__/configruedEnvs.test.ts} +3 -3
- package/src/config/configruedEnvs.ts +2 -7
- package/src/config/readConfig.ts +1 -1
- package/src/context/{resolveReferences.test.ts → __tests__/resolveReferences.test.ts} +23 -38
- package/src/context/getEnvConfig.ts +21 -0
- package/src/context/getEnvType.ts +17 -0
- package/src/context/getEnvironment.ts +40 -0
- package/src/context/getEnvironmentContext.ts +57 -0
- package/src/context/getEnvironmentVariables.ts +155 -0
- package/src/context/getLabels.ts +20 -0
- package/src/context/index.ts +28 -193
- package/src/context/resolveReferences.ts +35 -31
- package/src/defaults/index.ts +1 -1
- package/src/deploy/base.ts +43 -19
- package/src/deploy/cloudRun/deployJob.ts +276 -0
- package/src/deploy/cloudRun/index.ts +95 -0
- package/src/deploy/cloudRun/utils/createArgsString.ts +26 -0
- package/src/deploy/cloudRun/utils/database.ts +55 -0
- package/src/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.ts +14 -0
- package/src/deploy/cloudRun/utils/jobName.ts +2 -0
- package/src/deploy/custom/deployJob.ts +13 -3
- package/src/deploy/custom/index.ts +9 -1
- package/src/deploy/dockerTag/deployJob.ts +31 -0
- package/src/deploy/dockerTag/index.ts +9 -0
- package/src/deploy/index.ts +26 -17
- package/src/deploy/kubernetes/additionalSecretKeys.ts +23 -0
- package/src/deploy/kubernetes/cloudSql/index.ts +28 -0
- package/src/deploy/kubernetes/deployJob.ts +21 -78
- package/src/deploy/kubernetes/index.ts +42 -1
- package/src/deploy/kubernetes/kubeEnv.ts +48 -0
- package/src/deploy/kubernetes/kubeValues.ts +96 -0
- package/src/deploy/kubernetes/mongodb.ts +104 -7
- package/src/deploy/kubernetes/processSecretsAsFiles.ts +1 -1
- package/src/deploy/types/base.ts +17 -0
- package/src/deploy/types/custom.ts +36 -0
- package/src/deploy/types/dockerTag.ts +12 -0
- package/src/deploy/types/googleCloudRun.ts +179 -0
- package/src/deploy/types/index.ts +28 -0
- package/src/deploy/types/kubernetes.ts +301 -0
- package/src/deploy/utils.ts +6 -2
- package/src/pipeline/commitInfo/getBuildId.ts +6 -0
- package/src/pipeline/commitInfo/getCommitInfo.ts +12 -0
- package/src/pipeline/createAllJobs.ts +38 -0
- package/src/pipeline/createChildPipeline.ts +9 -20
- package/src/pipeline/createJobsForComponent.ts +64 -0
- package/src/pipeline/gitlab/createGitlabJobs.ts +149 -0
- package/src/pipeline/index.ts +1 -1
- package/src/pipeline/packageManager.ts +4 -38
- package/src/pipeline/yarn/yarnUtils.ts +37 -0
- package/src/rules/index.ts +9 -6
- package/src/runner/index.ts +2 -1
- package/src/types/config.ts +26 -13
- package/src/types/context.ts +23 -2
- package/src/types/environmentContext.ts +33 -0
- package/src/types/gitlab-types.ts +36 -6
- package/src/types/jobs.ts +30 -6
- package/src/types/pipeline.ts +1 -1
- package/src/types/utils.ts +7 -0
- package/src/utils/gitlab.ts +23 -0
- package/tsconfig.json +3 -1
- package/dist/build/base/getBuildInfo.d.ts +0 -2
- package/dist/build/tests/storybook.test.d.ts +0 -1
- package/dist/context/resolveReferences.test.js +0 -141
- package/dist/deploy/kubernetes/cloudsql.d.ts +0 -6
- package/dist/deploy/kubernetes/cloudsql.js +0 -16
- package/dist/deploy/types.d.ts +0 -196
- package/dist/deploy/types.js +0 -16
- package/dist/pipeline/createChildPipeline.test.d.ts +0 -1
- package/dist/pipeline/createJobs.d.ts +0 -3
- package/dist/pipeline/gitlab/makeGitlabJob.d.ts +0 -8
- package/dist/pipeline/gitlab/makeGitlabJob.js +0 -45
- package/src/build/tests/storybook.test.ts +0 -54
- package/src/deploy/kubernetes/cloudsql.ts +0 -12
- package/src/deploy/types.ts +0 -189
- package/src/pipeline/createChildPipeline.test.ts +0 -49
- package/src/pipeline/createJobs.ts +0 -195
- package/src/pipeline/gitlab/makeGitlabJob.ts +0 -16
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
|
|
5
|
-
var resolveReferences_1 = require("./resolveReferences");
|
|
6
|
-
|
|
7
|
-
describe("resolveReferences", function () {
|
|
8
|
-
it("replaces occurences of ${componentName:VARIABLE_NAME}", function () {
|
|
9
|
-
var variables = {
|
|
10
|
-
a: "hello world",
|
|
11
|
-
b: "a replaced value looks like this: '${api:FOO}', nice!"
|
|
12
|
-
};
|
|
13
|
-
var otherVariables = {
|
|
14
|
-
api: {
|
|
15
|
-
FOO: "foo from api"
|
|
16
|
-
},
|
|
17
|
-
frontend: {
|
|
18
|
-
FOO: "foo from frontend"
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
var result = (0, resolveReferences_1.resolveReferences)(variables, function (componentName, variableName) {
|
|
22
|
-
var _a;
|
|
23
|
-
|
|
24
|
-
return (_a = otherVariables[componentName]) === null || _a === void 0 ? void 0 : _a[variableName];
|
|
25
|
-
});
|
|
26
|
-
expect(result).toEqual({
|
|
27
|
-
a: "hello world",
|
|
28
|
-
b: "a replaced value looks like this: 'foo from api', nice!"
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
it("replaces self references with structure ${VARIABLE_NAME}", function () {
|
|
32
|
-
var variables = {
|
|
33
|
-
FOO: "hello world",
|
|
34
|
-
BAR: "this: ${FOO}!"
|
|
35
|
-
};
|
|
36
|
-
var result = (0, resolveReferences_1.resolveReferences)(variables);
|
|
37
|
-
expect(result).toEqual({
|
|
38
|
-
FOO: "hello world",
|
|
39
|
-
BAR: "this: hello world!"
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
it("replaces self references mixed with other vars", function () {
|
|
43
|
-
var variables = {
|
|
44
|
-
FOO: "hello from ${api:FOO}",
|
|
45
|
-
BAR: "this: ${FOO}!"
|
|
46
|
-
};
|
|
47
|
-
var otherVariables = {
|
|
48
|
-
api: {
|
|
49
|
-
FOO: "foo from api"
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
var result = (0, resolveReferences_1.resolveReferences)(variables, function (componentName, variableName) {
|
|
53
|
-
var _a;
|
|
54
|
-
|
|
55
|
-
return (_a = otherVariables[componentName]) === null || _a === void 0 ? void 0 : _a[variableName];
|
|
56
|
-
});
|
|
57
|
-
expect(result).toEqual({
|
|
58
|
-
FOO: "hello from foo from api",
|
|
59
|
-
BAR: "this: hello from foo from api!"
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
it("keeps variables as is if not found (when null is returned)", function () {
|
|
63
|
-
var variables = {
|
|
64
|
-
a: "hello world",
|
|
65
|
-
b: "a not found value looks like this: '${api:FOO}'"
|
|
66
|
-
};
|
|
67
|
-
var otherVariables = {};
|
|
68
|
-
var result = (0, resolveReferences_1.resolveReferences)(variables, function (componentName, variableName) {
|
|
69
|
-
var _a;
|
|
70
|
-
|
|
71
|
-
return (_a = otherVariables[componentName]) === null || _a === void 0 ? void 0 : _a[variableName];
|
|
72
|
-
});
|
|
73
|
-
expect(result).toEqual({
|
|
74
|
-
a: "hello world",
|
|
75
|
-
b: "a not found value looks like this: '${api:FOO}'"
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
it("replaces mulitple levels deep", function () {
|
|
79
|
-
var variables = {
|
|
80
|
-
a: "value is ${frontend:FOO}!"
|
|
81
|
-
};
|
|
82
|
-
var otherVariables = {
|
|
83
|
-
api: {
|
|
84
|
-
FOO: "foo from api"
|
|
85
|
-
},
|
|
86
|
-
frontend: {
|
|
87
|
-
FOO: "hi, ${api:FOO}"
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
var result = (0, resolveReferences_1.resolveReferences)(variables, function (componentName, variableName) {
|
|
91
|
-
var _a, _b;
|
|
92
|
-
|
|
93
|
-
return (_b = (_a = otherVariables[componentName]) === null || _a === void 0 ? void 0 : _a[variableName]) !== null && _b !== void 0 ? _b : "";
|
|
94
|
-
});
|
|
95
|
-
expect(result).toEqual({
|
|
96
|
-
a: "value is hi, foo from api!"
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
it("prevents endless loops", function () {
|
|
100
|
-
var variables = {
|
|
101
|
-
a: "value is ${frontend:FOO}!"
|
|
102
|
-
};
|
|
103
|
-
var otherVariables = {
|
|
104
|
-
api: {
|
|
105
|
-
FOO: "api ${frontend:FOO}"
|
|
106
|
-
},
|
|
107
|
-
frontend: {
|
|
108
|
-
FOO: "frontend ${api:FOO}"
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
var result = (0, resolveReferences_1.resolveReferences)(variables, function (componentName, variableName) {
|
|
112
|
-
var _a, _b;
|
|
113
|
-
|
|
114
|
-
return (_b = (_a = otherVariables[componentName]) === null || _a === void 0 ? void 0 : _a[variableName]) !== null && _b !== void 0 ? _b : "";
|
|
115
|
-
});
|
|
116
|
-
expect(result).toEqual({
|
|
117
|
-
a: "value is frontend api ${frontend:FOO}!"
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
describe("translateLegacyFromComponents", function () {
|
|
122
|
-
it("translatetes the old `fromComponents` approach to ${componentName:variableName}", function () {
|
|
123
|
-
var fromComponents = {
|
|
124
|
-
api: {
|
|
125
|
-
API_FOO: "FOO",
|
|
126
|
-
API_BAR: "BAR"
|
|
127
|
-
},
|
|
128
|
-
www: {
|
|
129
|
-
WWW_X: "X",
|
|
130
|
-
WWW_Y: "Y"
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
var result = (0, resolveReferences_1.translateLegacyFromComponents)(fromComponents);
|
|
134
|
-
expect(result).toEqual({
|
|
135
|
-
API_FOO: "${api:FOO}",
|
|
136
|
-
API_BAR: "${api:BAR}",
|
|
137
|
-
WWW_X: "${www:X}",
|
|
138
|
-
WWW_Y: "${www:Y}"
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.createCloudsqlBaseConfig = void 0;
|
|
5
|
-
|
|
6
|
-
var __1 = require("../..");
|
|
7
|
-
|
|
8
|
-
var createCloudsqlBaseConfig = function (context) {
|
|
9
|
-
return {
|
|
10
|
-
cloudsql: {
|
|
11
|
-
proxyCredentials: "$".concat((0, __1.getSecretVarNameForContext)(context, "cloudsqlProxyCredentials"))
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
exports.createCloudsqlBaseConfig = createCloudsqlBaseConfig;
|
package/dist/deploy/types.d.ts
DELETED
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
export declare type DeployConfigBase = {
|
|
2
|
-
/**
|
|
3
|
-
* whether to deploy automatically or manual. If not defined, these rules apply:
|
|
4
|
-
* - prod: manual
|
|
5
|
-
* - all other envs: auto
|
|
6
|
-
*/
|
|
7
|
-
when?: "manual" | "auto";
|
|
8
|
-
};
|
|
9
|
-
declare type AllowUnknownProps<T extends Record<string, unknown>> = T & Record<string, unknown>;
|
|
10
|
-
export declare type DeployConfigKubernetesClusterGCloud = {
|
|
11
|
-
type: "gcloud";
|
|
12
|
-
/**
|
|
13
|
-
* gcoud name of the cluster
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
name: string;
|
|
17
|
-
/**
|
|
18
|
-
* google cloud project id
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
projectId: string;
|
|
22
|
-
/**
|
|
23
|
-
* region
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
region: string;
|
|
27
|
-
/**
|
|
28
|
-
* domain of the cluster, for canonical domains without custom host (e.g. review and dev apps)
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
domainCanonical?: string;
|
|
32
|
-
};
|
|
33
|
-
export declare type DeployConfigKubernetesCluster = DeployConfigKubernetesClusterGCloud;
|
|
34
|
-
export declare type KubernetesAutoscaleMetricResourceTarget = {
|
|
35
|
-
type: "Utilization";
|
|
36
|
-
averageUtilization: number;
|
|
37
|
-
} | {
|
|
38
|
-
type: "AverageValue";
|
|
39
|
-
averageValue: number | string;
|
|
40
|
-
};
|
|
41
|
-
export declare type KubernetesAutoscaleMetric = {
|
|
42
|
-
type: "Resource";
|
|
43
|
-
resource: {
|
|
44
|
-
name: "cpu" | "memory";
|
|
45
|
-
target: KubernetesAutoscaleMetricResourceTarget;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
export declare type KubernetesAutoscale = {
|
|
49
|
-
minReplicas: number;
|
|
50
|
-
maxReplicas: number;
|
|
51
|
-
/**
|
|
52
|
-
* declare a number of metrics (at least one). Usually you would use cpu as a metric
|
|
53
|
-
*/
|
|
54
|
-
|
|
55
|
-
metrics: KubernetesAutoscaleMetric[];
|
|
56
|
-
};
|
|
57
|
-
declare type KubernetesHealthDef = {
|
|
58
|
-
httpGet?: {
|
|
59
|
-
path?: string;
|
|
60
|
-
port?: number;
|
|
61
|
-
httpHeaders?: {
|
|
62
|
-
name: string;
|
|
63
|
-
value: string;
|
|
64
|
-
}[];
|
|
65
|
-
failureThreshold?: number;
|
|
66
|
-
timeoutSeconds?: number;
|
|
67
|
-
periodSeconds?: number;
|
|
68
|
-
successThreshold?: number;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
export declare type DeployConfigKubernetesValues = AllowUnknownProps<{
|
|
72
|
-
/**
|
|
73
|
-
* enable cloudsql db. Currently you have to manually set it up
|
|
74
|
-
*/
|
|
75
|
-
cloudsql?: {
|
|
76
|
-
enabled: boolean;
|
|
77
|
-
instanceId?: string;
|
|
78
|
-
projectId?: string;
|
|
79
|
-
region?: string;
|
|
80
|
-
};
|
|
81
|
-
/**
|
|
82
|
-
* enable mongodb. The mongodb is deployed using a helm chart.
|
|
83
|
-
* Consider using external services instead of this.
|
|
84
|
-
*/
|
|
85
|
-
|
|
86
|
-
mongodb?: AllowUnknownProps<{
|
|
87
|
-
enabled: boolean;
|
|
88
|
-
}>;
|
|
89
|
-
/**
|
|
90
|
-
* enable mailhog. Mailhog is a virtual mail server that catches all outgoing mailsl and show them in a mailbox.
|
|
91
|
-
* This is great for development as it prevents to accidentially send out real emails and helps with debugging outgoing mails.
|
|
92
|
-
*
|
|
93
|
-
* It will automaticaly inject a MAIL_URL env var.
|
|
94
|
-
*
|
|
95
|
-
* Turn it of for production.
|
|
96
|
-
*/
|
|
97
|
-
|
|
98
|
-
mailhog?: {
|
|
99
|
-
enabled: boolean;
|
|
100
|
-
};
|
|
101
|
-
/**
|
|
102
|
-
* post-install/upgrade jobs. These use the app image and have all env vars available.
|
|
103
|
-
* Typically used for migrations and seeds
|
|
104
|
-
*/
|
|
105
|
-
|
|
106
|
-
jobs?: Record<string, AllowUnknownProps<{
|
|
107
|
-
command: string;
|
|
108
|
-
}>>;
|
|
109
|
-
/**
|
|
110
|
-
* cronjobs that run periodically. These use the app image have all env vars available.
|
|
111
|
-
*/
|
|
112
|
-
|
|
113
|
-
cronjobs?: Record<string, AllowUnknownProps<{
|
|
114
|
-
schedule: string;
|
|
115
|
-
command: string;
|
|
116
|
-
concurrencyPolicy?: "Forbid" | "Allow" | "Replace";
|
|
117
|
-
}>>;
|
|
118
|
-
/**
|
|
119
|
-
* configuration for the application ("Deployment" in kubernetes)
|
|
120
|
-
*/
|
|
121
|
-
|
|
122
|
-
application?: AllowUnknownProps<{
|
|
123
|
-
/**
|
|
124
|
-
* redirects
|
|
125
|
-
*/
|
|
126
|
-
redirects?: AllowUnknownProps<{
|
|
127
|
-
host: string;
|
|
128
|
-
}>[];
|
|
129
|
-
/**
|
|
130
|
-
* how many pods will be started
|
|
131
|
-
*/
|
|
132
|
-
|
|
133
|
-
replicas?: number;
|
|
134
|
-
/**
|
|
135
|
-
* autoscale the pods horizontally
|
|
136
|
-
*/
|
|
137
|
-
|
|
138
|
-
autoscale?: KubernetesAutoscale;
|
|
139
|
-
/**
|
|
140
|
-
* kubernetes resources
|
|
141
|
-
*/
|
|
142
|
-
|
|
143
|
-
resources?: {
|
|
144
|
-
limits?: {
|
|
145
|
-
cpu?: string;
|
|
146
|
-
memory?: string;
|
|
147
|
-
};
|
|
148
|
-
requests?: {
|
|
149
|
-
cpu?: string;
|
|
150
|
-
memory?: string;
|
|
151
|
-
};
|
|
152
|
-
};
|
|
153
|
-
healthRoute?: string;
|
|
154
|
-
startupProbe?: KubernetesHealthDef;
|
|
155
|
-
readinessProbe?: KubernetesHealthDef;
|
|
156
|
-
livenessProbe?: KubernetesHealthDef;
|
|
157
|
-
}>;
|
|
158
|
-
/**
|
|
159
|
-
* Mount secrets as files in the filesystem.
|
|
160
|
-
* These secrets are still available as env vars, but will contain the path of the file instead
|
|
161
|
-
*/
|
|
162
|
-
|
|
163
|
-
secretsAsFile?: string[];
|
|
164
|
-
}>;
|
|
165
|
-
export declare type DeployConfigKubernetes = {
|
|
166
|
-
type: "kubernetes";
|
|
167
|
-
/**
|
|
168
|
-
* cluster config to use.
|
|
169
|
-
*/
|
|
170
|
-
|
|
171
|
-
cluster: DeployConfigKubernetesCluster;
|
|
172
|
-
/**
|
|
173
|
-
* prints out debug info (helm --debug)
|
|
174
|
-
*/
|
|
175
|
-
|
|
176
|
-
debug?: boolean;
|
|
177
|
-
additionalHelmArgs?: string[];
|
|
178
|
-
/**
|
|
179
|
-
* values to configure the app
|
|
180
|
-
*/
|
|
181
|
-
|
|
182
|
-
values?: DeployConfigKubernetesValues;
|
|
183
|
-
} & DeployConfigBase;
|
|
184
|
-
declare type DeployConfigCustom = {
|
|
185
|
-
type: "custom";
|
|
186
|
-
requiresDocker: boolean;
|
|
187
|
-
script: string[];
|
|
188
|
-
stopScript?: string[];
|
|
189
|
-
} & DeployConfigBase;
|
|
190
|
-
export declare type DeployConfig = DeployConfigKubernetes | DeployConfigCustom;
|
|
191
|
-
export declare const isOfDeployType: <T extends ("kubernetes" | "custom")[]>(t: DeployConfig | false, ...types: T) => t is Extract<DeployConfigKubernetes, {
|
|
192
|
-
type: T[number];
|
|
193
|
-
}> | Extract<DeployConfigCustom, {
|
|
194
|
-
type: T[number];
|
|
195
|
-
}>;
|
|
196
|
-
export {};
|
package/dist/deploy/types.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.isOfDeployType = void 0;
|
|
5
|
-
|
|
6
|
-
var isOfDeployType = function (t) {
|
|
7
|
-
var types = [];
|
|
8
|
-
|
|
9
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
10
|
-
types[_i - 1] = arguments[_i];
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
return t && types.includes(t.type);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
exports.isOfDeployType = isOfDeployType;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { PipelineJob } from "../types";
|
|
2
|
-
import { Config, PipelineTrigger } from "../types/config";
|
|
3
|
-
export declare const createJobs: <T extends "gitlab">(type: T, envs: string[], config: Config, componentName: string, trigger: PipelineTrigger) => Promise<Record<string, PipelineJob<T>>>;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
|
|
8
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
return __assign.apply(this, arguments);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
var __rest = this && this.__rest || function (s, e) {
|
|
18
|
-
var t = {};
|
|
19
|
-
|
|
20
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
21
|
-
|
|
22
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
23
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
24
|
-
}
|
|
25
|
-
return t;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
exports.__esModule = true;
|
|
29
|
-
exports.makeGitlabJob = void 0;
|
|
30
|
-
|
|
31
|
-
var defaults_1 = require("../../defaults");
|
|
32
|
-
|
|
33
|
-
var makeGitlabJob = function (_a) {
|
|
34
|
-
var envMode = _a.envMode,
|
|
35
|
-
needsStages = _a.needsStages,
|
|
36
|
-
name = _a.name,
|
|
37
|
-
rest = __rest(_a, ["envMode", "needsStages", "name"]);
|
|
38
|
-
|
|
39
|
-
return __assign(__assign({}, rest), {
|
|
40
|
-
retry: defaults_1.BASE_RETRY,
|
|
41
|
-
interruptible: true
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
exports.makeGitlabJob = makeGitlabJob;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { Config } from "../../types";
|
|
2
|
-
import { createChildPipeline } from "../../";
|
|
3
|
-
|
|
4
|
-
describe("storybook build", () => {
|
|
5
|
-
describe("creates two build jobs", () => {
|
|
6
|
-
const config: Config = {
|
|
7
|
-
appName: "test",
|
|
8
|
-
customerName: "pan",
|
|
9
|
-
components: {
|
|
10
|
-
"my-app": {
|
|
11
|
-
dir: "myapp",
|
|
12
|
-
build: {
|
|
13
|
-
type: "storybook",
|
|
14
|
-
},
|
|
15
|
-
deploy: {
|
|
16
|
-
type: "kubernetes",
|
|
17
|
-
cluster: {
|
|
18
|
-
name: "production",
|
|
19
|
-
projectId: "bla",
|
|
20
|
-
region: "europe",
|
|
21
|
-
type: "gcloud",
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
it("creates a pipeline for storybook that does not contain test stages", async () => {
|
|
29
|
-
const { jobs } = await createChildPipeline(
|
|
30
|
-
"gitlab",
|
|
31
|
-
"mainBranch",
|
|
32
|
-
config
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
expect(Object.keys(jobs)).toEqual([
|
|
36
|
-
"dev my-app app-build",
|
|
37
|
-
"dev my-app docker-build",
|
|
38
|
-
"dev my-app deploy-to-kubernetes",
|
|
39
|
-
"dev my-app kubernetes-stop",
|
|
40
|
-
]);
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
it("runs build and renames folder", async () => {
|
|
44
|
-
const { jobs } = await createChildPipeline(
|
|
45
|
-
"gitlab",
|
|
46
|
-
"mainBranch",
|
|
47
|
-
config
|
|
48
|
-
);
|
|
49
|
-
const buildJob = jobs["dev my-app app-build"];
|
|
50
|
-
expect(buildJob.script).toContain("yarn storybook");
|
|
51
|
-
expect(buildJob.script).toContain("mv ./storybook-out /dist");
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Context, getSecretVarNameForContext } from "../..";
|
|
2
|
-
|
|
3
|
-
export const createCloudsqlBaseConfig = (context: Context) => {
|
|
4
|
-
return {
|
|
5
|
-
cloudsql: {
|
|
6
|
-
proxyCredentials: `$${getSecretVarNameForContext(
|
|
7
|
-
context,
|
|
8
|
-
"cloudsqlProxyCredentials"
|
|
9
|
-
)}`,
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
|
-
};
|
package/src/deploy/types.ts
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
2
|
-
export type DeployConfigBase = {
|
|
3
|
-
/**
|
|
4
|
-
* whether to deploy automatically or manual. If not defined, these rules apply:
|
|
5
|
-
* - prod: manual
|
|
6
|
-
* - all other envs: auto
|
|
7
|
-
*/
|
|
8
|
-
when?: "manual" | "auto";
|
|
9
|
-
};
|
|
10
|
-
type AllowUnknownProps<T extends Record<string, unknown>> = T &
|
|
11
|
-
Record<string, unknown>;
|
|
12
|
-
|
|
13
|
-
export type DeployConfigKubernetesClusterGCloud = {
|
|
14
|
-
type: "gcloud";
|
|
15
|
-
/**
|
|
16
|
-
* gcoud name of the cluster
|
|
17
|
-
*/
|
|
18
|
-
name: string;
|
|
19
|
-
/**
|
|
20
|
-
* google cloud project id
|
|
21
|
-
*/
|
|
22
|
-
projectId: string;
|
|
23
|
-
/**
|
|
24
|
-
* region
|
|
25
|
-
*/
|
|
26
|
-
region: string;
|
|
27
|
-
/**
|
|
28
|
-
* domain of the cluster, for canonical domains without custom host (e.g. review and dev apps)
|
|
29
|
-
*/
|
|
30
|
-
domainCanonical?: string;
|
|
31
|
-
};
|
|
32
|
-
export type DeployConfigKubernetesCluster = DeployConfigKubernetesClusterGCloud; // currently only this
|
|
33
|
-
|
|
34
|
-
export type KubernetesAutoscaleMetricResourceTarget =
|
|
35
|
-
| {
|
|
36
|
-
type: "Utilization";
|
|
37
|
-
averageUtilization: number;
|
|
38
|
-
}
|
|
39
|
-
| {
|
|
40
|
-
type: "AverageValue";
|
|
41
|
-
averageValue: number | string;
|
|
42
|
-
};
|
|
43
|
-
export type KubernetesAutoscaleMetric = {
|
|
44
|
-
type: "Resource";
|
|
45
|
-
resource: {
|
|
46
|
-
name: "cpu" | "memory";
|
|
47
|
-
target: KubernetesAutoscaleMetricResourceTarget;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
export type KubernetesAutoscale = {
|
|
51
|
-
minReplicas: number;
|
|
52
|
-
maxReplicas: number;
|
|
53
|
-
/**
|
|
54
|
-
* declare a number of metrics (at least one). Usually you would use cpu as a metric
|
|
55
|
-
*/
|
|
56
|
-
metrics: KubernetesAutoscaleMetric[];
|
|
57
|
-
};
|
|
58
|
-
type KubernetesHealthDef = {
|
|
59
|
-
httpGet?: {
|
|
60
|
-
path?: string;
|
|
61
|
-
port?: number;
|
|
62
|
-
httpHeaders?: {
|
|
63
|
-
name: string;
|
|
64
|
-
value: string;
|
|
65
|
-
}[];
|
|
66
|
-
failureThreshold?: number;
|
|
67
|
-
timeoutSeconds?: number;
|
|
68
|
-
periodSeconds?: number;
|
|
69
|
-
successThreshold?: number;
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
export type DeployConfigKubernetesValues = AllowUnknownProps<{
|
|
73
|
-
/**
|
|
74
|
-
* enable cloudsql db. Currently you have to manually set it up
|
|
75
|
-
*/
|
|
76
|
-
cloudsql?: {
|
|
77
|
-
enabled: boolean;
|
|
78
|
-
instanceId?: string;
|
|
79
|
-
projectId?: string;
|
|
80
|
-
region?: string;
|
|
81
|
-
};
|
|
82
|
-
/**
|
|
83
|
-
* enable mongodb. The mongodb is deployed using a helm chart.
|
|
84
|
-
* Consider using external services instead of this.
|
|
85
|
-
*/
|
|
86
|
-
mongodb?: AllowUnknownProps<{
|
|
87
|
-
enabled: boolean;
|
|
88
|
-
}>;
|
|
89
|
-
/**
|
|
90
|
-
* enable mailhog. Mailhog is a virtual mail server that catches all outgoing mailsl and show them in a mailbox.
|
|
91
|
-
* This is great for development as it prevents to accidentially send out real emails and helps with debugging outgoing mails.
|
|
92
|
-
*
|
|
93
|
-
* It will automaticaly inject a MAIL_URL env var.
|
|
94
|
-
*
|
|
95
|
-
* Turn it of for production.
|
|
96
|
-
*/
|
|
97
|
-
mailhog?: {
|
|
98
|
-
enabled: boolean;
|
|
99
|
-
};
|
|
100
|
-
/**
|
|
101
|
-
* post-install/upgrade jobs. These use the app image and have all env vars available.
|
|
102
|
-
* Typically used for migrations and seeds
|
|
103
|
-
*/
|
|
104
|
-
jobs?: Record<string, AllowUnknownProps<{ command: string }>>;
|
|
105
|
-
/**
|
|
106
|
-
* cronjobs that run periodically. These use the app image have all env vars available.
|
|
107
|
-
*/
|
|
108
|
-
cronjobs?: Record<
|
|
109
|
-
string,
|
|
110
|
-
AllowUnknownProps<{
|
|
111
|
-
schedule: string;
|
|
112
|
-
command: string;
|
|
113
|
-
concurrencyPolicy?: "Forbid" | "Allow" | "Replace";
|
|
114
|
-
}>
|
|
115
|
-
>;
|
|
116
|
-
/**
|
|
117
|
-
* configuration for the application ("Deployment" in kubernetes)
|
|
118
|
-
*/
|
|
119
|
-
application?: AllowUnknownProps<{
|
|
120
|
-
/**
|
|
121
|
-
* redirects
|
|
122
|
-
*/
|
|
123
|
-
redirects?: AllowUnknownProps<{ host: string }>[];
|
|
124
|
-
/**
|
|
125
|
-
* how many pods will be started
|
|
126
|
-
*/
|
|
127
|
-
replicas?: number;
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* autoscale the pods horizontally
|
|
131
|
-
*/
|
|
132
|
-
autoscale?: KubernetesAutoscale;
|
|
133
|
-
/**
|
|
134
|
-
* kubernetes resources
|
|
135
|
-
*/
|
|
136
|
-
resources?: {
|
|
137
|
-
limits?: {
|
|
138
|
-
cpu?: string;
|
|
139
|
-
memory?: string;
|
|
140
|
-
};
|
|
141
|
-
requests?: {
|
|
142
|
-
cpu?: string;
|
|
143
|
-
memory?: string;
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
healthRoute?: string;
|
|
147
|
-
startupProbe?: KubernetesHealthDef;
|
|
148
|
-
readinessProbe?: KubernetesHealthDef;
|
|
149
|
-
livenessProbe?: KubernetesHealthDef;
|
|
150
|
-
}>;
|
|
151
|
-
/**
|
|
152
|
-
* Mount secrets as files in the filesystem.
|
|
153
|
-
* These secrets are still available as env vars, but will contain the path of the file instead
|
|
154
|
-
*/
|
|
155
|
-
secretsAsFile?: string[];
|
|
156
|
-
}>;
|
|
157
|
-
|
|
158
|
-
export type DeployConfigKubernetes = {
|
|
159
|
-
type: "kubernetes";
|
|
160
|
-
/**
|
|
161
|
-
* cluster config to use.
|
|
162
|
-
*/
|
|
163
|
-
cluster: DeployConfigKubernetesCluster;
|
|
164
|
-
/**
|
|
165
|
-
* prints out debug info (helm --debug)
|
|
166
|
-
*/
|
|
167
|
-
debug?: boolean;
|
|
168
|
-
additionalHelmArgs?: string[];
|
|
169
|
-
/**
|
|
170
|
-
* values to configure the app
|
|
171
|
-
*/
|
|
172
|
-
values?: DeployConfigKubernetesValues;
|
|
173
|
-
} & DeployConfigBase;
|
|
174
|
-
|
|
175
|
-
type DeployConfigCustom = {
|
|
176
|
-
type: "custom";
|
|
177
|
-
requiresDocker: boolean;
|
|
178
|
-
script: string[];
|
|
179
|
-
stopScript?: string[];
|
|
180
|
-
} & DeployConfigBase;
|
|
181
|
-
|
|
182
|
-
export type DeployConfig = DeployConfigKubernetes | DeployConfigCustom;
|
|
183
|
-
|
|
184
|
-
export const isOfDeployType = <T extends Array<DeployConfig["type"]>>(
|
|
185
|
-
t: DeployConfig | false,
|
|
186
|
-
...types: T
|
|
187
|
-
): t is Extract<DeployConfig, { type: T[number] }> => {
|
|
188
|
-
return t && types.includes(t.type);
|
|
189
|
-
};
|