@catladder/cli 0.0.0-refactor-resolve-references-2-f2d2b81a → 0.0.0-refactor-resolve-references-next-de1019aa
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 +67 -208
- package/dist/bundles/cli/index.js +59 -202
- package/dist/cli/src/apps/catenv/printVariables.js +4 -2
- package/dist/cli/src/apps/catenv/printVariables.js.map +1 -1
- package/dist/cli/src/apps/catenv/writeDotEnvFiles.js +1 -1
- package/dist/cli/src/apps/catenv/writeDotEnvFiles.js.map +1 -1
- package/dist/cli/src/apps/catenv/writeEnvDTs.js +1 -1
- package/dist/cli/src/apps/catenv/writeEnvDTs.js.map +1 -1
- package/dist/pipeline/src/build/base/createAppBuildJob.js +2 -3
- package/dist/pipeline/src/build/base/createAppBuildJob.js.map +1 -1
- package/dist/pipeline/src/build/base/writeDotEnv.js +2 -1
- package/dist/pipeline/src/build/base/writeDotEnv.js.map +1 -1
- package/dist/pipeline/src/build/custom/testJob.js +10 -11
- package/dist/pipeline/src/build/custom/testJob.js.map +1 -1
- package/dist/pipeline/src/build/node/buildJob.js +1 -1
- package/dist/pipeline/src/build/node/buildJob.js.map +1 -1
- package/dist/pipeline/src/build/node/cache.d.ts +1 -3
- package/dist/pipeline/src/build/node/cache.js +1 -27
- package/dist/pipeline/src/build/node/cache.js.map +1 -1
- package/dist/pipeline/src/build/node/testJob.js +10 -11
- package/dist/pipeline/src/build/node/testJob.js.map +1 -1
- package/dist/pipeline/src/build/rails/build.js +0 -1
- package/dist/pipeline/src/build/rails/build.js.map +1 -1
- package/dist/pipeline/src/build/rails/test.js +7 -8
- package/dist/pipeline/src/build/rails/test.js.map +1 -1
- package/dist/pipeline/src/build/types.d.ts +0 -10
- package/dist/pipeline/src/build/types.js.map +1 -1
- package/dist/pipeline/src/context/createComponentContext.js +0 -1
- package/dist/pipeline/src/context/createComponentContext.js.map +1 -1
- package/dist/pipeline/src/context/getEnvironment.js +0 -1
- package/dist/pipeline/src/context/getEnvironment.js.map +1 -1
- package/dist/pipeline/src/context/getEnvironmentVariables.d.ts +2 -5
- package/dist/pipeline/src/context/getEnvironmentVariables.js +10 -21
- package/dist/pipeline/src/context/getEnvironmentVariables.js.map +1 -1
- package/dist/pipeline/src/deploy/base/deploy.js +3 -4
- package/dist/pipeline/src/deploy/base/deploy.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/index.js +2 -2
- package/dist/pipeline/src/deploy/cloudRun/index.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.js +3 -15
- package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/deployJob.js +0 -2
- package/dist/pipeline/src/deploy/kubernetes/deployJob.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/index.js +2 -2
- package/dist/pipeline/src/deploy/kubernetes/index.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.d.ts +1 -2
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.js +2 -3
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.js.map +1 -1
- package/dist/pipeline/src/deploy/types/base.d.ts +0 -6
- package/dist/pipeline/src/deploy/types/kubernetes.d.ts +1 -34
- package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.js +2 -4
- package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.js.map +1 -1
- package/dist/pipeline/src/types/config.d.ts +3 -9
- package/dist/pipeline/src/types/context.d.ts +0 -8
- package/dist/pipeline/src/types/context.js.map +1 -1
- package/dist/pipeline/src/types/jobs.d.ts +0 -8
- package/dist/pipeline/src/utils/writeFiles.js +1 -5
- package/dist/pipeline/src/utils/writeFiles.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/apps/catenv/printVariables.ts +2 -2
- package/src/apps/catenv/writeDotEnvFiles.ts +1 -1
- package/src/apps/catenv/writeEnvDTs.ts +1 -1
- package/dist/pipeline/src/context/translateLegacyFromComponents.d.ts +0 -3
- package/dist/pipeline/src/context/translateLegacyFromComponents.js +0 -13
- package/dist/pipeline/src/context/translateLegacyFromComponents.js.map +0 -1
- package/dist/pipeline/src/deploy/kubernetes/processSecretsAsFiles.d.ts +0 -85
- package/dist/pipeline/src/deploy/kubernetes/processSecretsAsFiles.js +0 -27
- package/dist/pipeline/src/deploy/kubernetes/processSecretsAsFiles.js.map +0 -1
- package/dist/pipeline/src/packageInfos.d.ts +0 -4
- package/dist/pipeline/src/packageInfos.js +0 -17
- package/dist/pipeline/src/packageInfos.js.map +0 -1
|
@@ -40,10 +40,11 @@ exports.printVariables = void 0;
|
|
|
40
40
|
const getProjectConfig_1 = __nccwpck_require__(5264);
|
|
41
41
|
const utils_1 = __nccwpck_require__(4560);
|
|
42
42
|
const getAllVariablesToPrint = async (config, choice) => {
|
|
43
|
+
var _a;
|
|
43
44
|
const { env, currentComponent } = await (0, utils_1.getCurrentComponentAndEnvFromChoice)(config, choice);
|
|
44
45
|
if (currentComponent) {
|
|
45
46
|
// don't print vars if dotenv is enabled
|
|
46
|
-
if (config.components[currentComponent].dotEnv) {
|
|
47
|
+
if ((_a = config.components[currentComponent].dotEnv) !== null && _a !== void 0 ? _a : true) {
|
|
47
48
|
return {};
|
|
48
49
|
}
|
|
49
50
|
return await (0, getProjectConfig_1.getEnvVarsResolved)(null, env, currentComponent);
|
|
@@ -53,8 +54,9 @@ const getAllVariablesToPrint = async (config, choice) => {
|
|
|
53
54
|
// this is not 100% correct, but better than not exporting any vars at all
|
|
54
55
|
// so we also add prefixed variants
|
|
55
56
|
return await Object.keys(config.components).reduce(async (acc, componentName) => {
|
|
57
|
+
var _a;
|
|
56
58
|
// don't print vars if dotenv is enabled
|
|
57
|
-
if (config.components[componentName].dotEnv) {
|
|
59
|
+
if ((_a = config.components[componentName].dotEnv) !== null && _a !== void 0 ? _a : true) {
|
|
58
60
|
return await acc;
|
|
59
61
|
}
|
|
60
62
|
const subappvars = await (0, getProjectConfig_1.getEnvVarsResolved)(null, env, componentName);
|
|
@@ -137,7 +139,7 @@ const utils_1 = __nccwpck_require__(4560);
|
|
|
137
139
|
const writeDotEnvFiles = async (config, choice) => {
|
|
138
140
|
const { env, currentComponent } = await (0, utils_1.getCurrentComponentAndEnvFromChoice)(config, choice);
|
|
139
141
|
const componentsWithEnabledDotEnvWrite = Object.entries(config.components)
|
|
140
|
-
.filter(([, component]) => component === null || component === void 0 ? void 0 : component.dotEnv) // when set to true or "local"
|
|
142
|
+
.filter(([, component]) => { var _a; return (_a = component === null || component === void 0 ? void 0 : component.dotEnv) !== null && _a !== void 0 ? _a : true; }) // when set to true or "local"
|
|
141
143
|
.map(([componentName]) => componentName);
|
|
142
144
|
const componentsToActuallyWriteDotEnvNow = currentComponent
|
|
143
145
|
? componentsWithEnabledDotEnvWrite.includes(currentComponent)
|
|
@@ -176,7 +178,7 @@ const utils_1 = __nccwpck_require__(4560);
|
|
|
176
178
|
const writeDTsFiles = async (config, choice) => {
|
|
177
179
|
const { env, currentComponent } = await (0, utils_1.getCurrentComponentAndEnvFromChoice)(config, choice);
|
|
178
180
|
const componentsWithEnabledEnvDTsWrite = Object.entries(config.components)
|
|
179
|
-
.filter(([, component]) => component === null || component === void 0 ? void 0 : component.envDTs)
|
|
181
|
+
.filter(([, component]) => { var _a; return (_a = component === null || component === void 0 ? void 0 : component.envDTs) !== null && _a !== void 0 ? _a : true; })
|
|
180
182
|
.map(([componentName]) => componentName);
|
|
181
183
|
const componentsToActuallyWriteEnvDts = currentComponent
|
|
182
184
|
? componentsWithEnabledEnvDTsWrite.includes(currentComponent)
|
|
@@ -1091,7 +1093,7 @@ const constants_1 = __nccwpck_require__(2786);
|
|
|
1091
1093
|
const writeBuildInfo_1 = __nccwpck_require__(9578);
|
|
1092
1094
|
const writeDotEnv_1 = __nccwpck_require__(8052);
|
|
1093
1095
|
const createAppBuildJob = (context, { script, variables, runnerVariables, cache, ...def }) => {
|
|
1094
|
-
var _a
|
|
1096
|
+
var _a;
|
|
1095
1097
|
return (0, lodash_1.merge)({
|
|
1096
1098
|
name: constants_1.APP_BUILD_JOB_NAME,
|
|
1097
1099
|
envMode: "jobPerEnv",
|
|
@@ -1105,14 +1107,13 @@ const createAppBuildJob = (context, { script, variables, runnerVariables, cache,
|
|
|
1105
1107
|
? {
|
|
1106
1108
|
...context.environment.envVars,
|
|
1107
1109
|
...context.environment.jobOnlyVars.build.envVars,
|
|
1108
|
-
...((_a = context.build.config.extraVars) !== null && _a !== void 0 ? _a : {}),
|
|
1109
1110
|
}
|
|
1110
1111
|
: {}),
|
|
1111
1112
|
},
|
|
1112
1113
|
runnerVariables: {
|
|
1113
1114
|
...constants_1.RUNNER_BUILD_RESOURCE_VARIABLES,
|
|
1114
1115
|
...(runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {}),
|
|
1115
|
-
...((
|
|
1116
|
+
...((_a = context.build.config.runnerVariables) !== null && _a !== void 0 ? _a : {}),
|
|
1116
1117
|
},
|
|
1117
1118
|
script: [
|
|
1118
1119
|
...(context.type === "component"
|
|
@@ -1319,7 +1320,8 @@ EOF`,
|
|
|
1319
1320
|
};
|
|
1320
1321
|
exports.writeDotEnv = writeDotEnv;
|
|
1321
1322
|
const componentContextNeedsBuildTimeDotEnv = (context) => {
|
|
1322
|
-
|
|
1323
|
+
var _a;
|
|
1324
|
+
return ((_a = context.componentConfig.dotEnv) !== null && _a !== void 0 ? _a : true) === true; // don't build when set to `local`
|
|
1323
1325
|
};
|
|
1324
1326
|
exports.componentContextNeedsBuildTimeDotEnv = componentContextNeedsBuildTimeDotEnv;
|
|
1325
1327
|
//# sourceMappingURL=writeDotEnv.js.map
|
|
@@ -1517,7 +1519,7 @@ const RUNNER_CUSTOM_TEST_VARIABLES = {
|
|
|
1517
1519
|
KUBERNETES_MEMORY_LIMIT: "4Gi",
|
|
1518
1520
|
};
|
|
1519
1521
|
const createCustomTestJobs = (context) => {
|
|
1520
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q
|
|
1522
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
1521
1523
|
// don't run tests after release
|
|
1522
1524
|
// TODO: this will be replaced by using rules
|
|
1523
1525
|
if (context.trigger === "taggedRelease") {
|
|
@@ -1531,7 +1533,6 @@ const createCustomTestJobs = (context) => {
|
|
|
1531
1533
|
variables: {
|
|
1532
1534
|
APP_PATH: context.build.dir,
|
|
1533
1535
|
...context.environment.jobOnlyVars.build.envVars,
|
|
1534
|
-
...((_a = buildConfig.extraVars) !== null && _a !== void 0 ? _a : {}),
|
|
1535
1536
|
},
|
|
1536
1537
|
runnerVariables: RUNNER_CUSTOM_TEST_VARIABLES,
|
|
1537
1538
|
services: buildConfig.jobServices,
|
|
@@ -1544,29 +1545,29 @@ const createCustomTestJobs = (context) => {
|
|
|
1544
1545
|
? {
|
|
1545
1546
|
name: "🛡 audit",
|
|
1546
1547
|
...base,
|
|
1547
|
-
image: (
|
|
1548
|
+
image: (_b = (_a = buildConfig.audit) === null || _a === void 0 ? void 0 : _a.jobImage) !== null && _b !== void 0 ? _b : buildConfig.jobImage,
|
|
1548
1549
|
cache: undefined,
|
|
1549
|
-
script: [...(0, utils_1.ensureArray)((
|
|
1550
|
+
script: [...(0, utils_1.ensureArray)((_c = buildConfig.audit) === null || _c === void 0 ? void 0 : _c.command)],
|
|
1550
1551
|
allow_failure: true,
|
|
1551
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
1552
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.artifactsReports, (_e = buildConfig.audit) === null || _e === void 0 ? void 0 : _e.artifacts),
|
|
1552
1553
|
}
|
|
1553
1554
|
: null;
|
|
1554
1555
|
const lintJob = buildConfig.lint
|
|
1555
1556
|
? {
|
|
1556
1557
|
name: "👮 lint",
|
|
1557
1558
|
...base,
|
|
1558
|
-
image: (
|
|
1559
|
-
script: [...(0, utils_1.ensureArray)((
|
|
1560
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
1559
|
+
image: (_g = (_f = buildConfig.lint) === null || _f === void 0 ? void 0 : _f.jobImage) !== null && _g !== void 0 ? _g : buildConfig.jobImage,
|
|
1560
|
+
script: [...(0, utils_1.ensureArray)((_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.command)],
|
|
1561
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.artifactsReports, (_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.artifacts),
|
|
1561
1562
|
}
|
|
1562
1563
|
: null;
|
|
1563
1564
|
const testJob = buildConfig.test
|
|
1564
1565
|
? {
|
|
1565
1566
|
name: "🧪 test",
|
|
1566
1567
|
...base,
|
|
1567
|
-
image: (
|
|
1568
|
-
script: [...(0, utils_1.ensureArray)((
|
|
1569
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
1568
|
+
image: (_m = (_l = buildConfig.test) === null || _l === void 0 ? void 0 : _l.jobImage) !== null && _m !== void 0 ? _m : buildConfig.jobImage,
|
|
1569
|
+
script: [...(0, utils_1.ensureArray)((_o = buildConfig.test) === null || _o === void 0 ? void 0 : _o.command)],
|
|
1570
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.artifactsReports, (_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.artifacts),
|
|
1570
1571
|
}
|
|
1571
1572
|
: null;
|
|
1572
1573
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
@@ -1868,7 +1869,7 @@ const createNodeBuildJobDefinition = (context) => {
|
|
|
1868
1869
|
const yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
1869
1870
|
return (0, createBuildJobDefinition_1.createBuildJobDefinition)(context, buildConfig, {
|
|
1870
1871
|
prescript: yarnInstall,
|
|
1871
|
-
cache:
|
|
1872
|
+
cache: (0, cache_1.getNodeCache)(context),
|
|
1872
1873
|
});
|
|
1873
1874
|
};
|
|
1874
1875
|
exports.createNodeBuildJobDefinition = createNodeBuildJobDefinition;
|
|
@@ -1903,7 +1904,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
1903
1904
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
1904
1905
|
};
|
|
1905
1906
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1906
|
-
exports.
|
|
1907
|
+
exports.getNodeCache = exports.getNodeModulesCache = exports.getYarnCache = void 0;
|
|
1907
1908
|
const lodash_1 = __nccwpck_require__(3255);
|
|
1908
1909
|
const path_1 = __nccwpck_require__(1017);
|
|
1909
1910
|
const slugify_1 = __importDefault(__nccwpck_require__(4035));
|
|
@@ -1952,35 +1953,9 @@ const getNodeCache = (context, policy = "pull-push") => {
|
|
|
1952
1953
|
return [
|
|
1953
1954
|
...(0, exports.getYarnCache)(context, policy),
|
|
1954
1955
|
...(0, exports.getNodeModulesCache)(context, policy),
|
|
1955
|
-
...(context.type === "workspace" ? (0, exports.getWorkspaceDefaultCaches)(context) : []),
|
|
1956
1956
|
];
|
|
1957
1957
|
};
|
|
1958
1958
|
exports.getNodeCache = getNodeCache;
|
|
1959
|
-
const getNextCache = (context) => {
|
|
1960
|
-
const paths = context.build
|
|
1961
|
-
.getComponentDirs("direct")
|
|
1962
|
-
.map((c) => (0, path_1.join)(c, ".next/cache"));
|
|
1963
|
-
return [
|
|
1964
|
-
{
|
|
1965
|
-
pathMode: "absolute",
|
|
1966
|
-
key: "next-cache",
|
|
1967
|
-
policy: "pull-push",
|
|
1968
|
-
paths,
|
|
1969
|
-
},
|
|
1970
|
-
];
|
|
1971
|
-
};
|
|
1972
|
-
exports.getNextCache = getNextCache;
|
|
1973
|
-
const getWorkspaceDefaultCaches = (context) => {
|
|
1974
|
-
return [
|
|
1975
|
-
{
|
|
1976
|
-
// turbo repo
|
|
1977
|
-
key: "turbo",
|
|
1978
|
-
policy: "pull-push",
|
|
1979
|
-
paths: [".turbo"],
|
|
1980
|
-
},
|
|
1981
|
-
];
|
|
1982
|
-
};
|
|
1983
|
-
exports.getWorkspaceDefaultCaches = getWorkspaceDefaultCaches;
|
|
1984
1959
|
//# sourceMappingURL=cache.js.map
|
|
1985
1960
|
|
|
1986
1961
|
/***/ }),
|
|
@@ -2105,7 +2080,7 @@ const constants_1 = __nccwpck_require__(1765);
|
|
|
2105
2080
|
const yarn_1 = __nccwpck_require__(5043);
|
|
2106
2081
|
const createJobCache_1 = __nccwpck_require__(340);
|
|
2107
2082
|
const createNodeTestJobs = (context) => {
|
|
2108
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t
|
|
2083
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
2109
2084
|
// don't run tests after release
|
|
2110
2085
|
// TODO: this will be replaced by using rules
|
|
2111
2086
|
if (context.trigger === "taggedRelease") {
|
|
@@ -2123,7 +2098,6 @@ const createNodeTestJobs = (context) => {
|
|
|
2123
2098
|
...(context.type === "component"
|
|
2124
2099
|
? {
|
|
2125
2100
|
...context.environment.jobOnlyVars.build.envVars,
|
|
2126
|
-
...((_a = context.build.config.extraVars) !== null && _a !== void 0 ? _a : {}),
|
|
2127
2101
|
}
|
|
2128
2102
|
: {}),
|
|
2129
2103
|
},
|
|
@@ -2138,48 +2112,48 @@ const createNodeTestJobs = (context) => {
|
|
|
2138
2112
|
? {
|
|
2139
2113
|
name: "🛡 audit",
|
|
2140
2114
|
...base,
|
|
2141
|
-
image: (
|
|
2115
|
+
image: (_b = (_a = buildConfig.audit) === null || _a === void 0 ? void 0 : _a.jobImage) !== null && _b !== void 0 ? _b : defaultImage,
|
|
2142
2116
|
cache: undefined, // audit does not need yarn install and no cache
|
|
2143
2117
|
script: [
|
|
2144
2118
|
`cd ${context.build.dir}`,
|
|
2145
|
-
...((
|
|
2119
|
+
...((_d = (0, utils_1.ensureArrayOrNull)((_c = buildConfig.audit) === null || _c === void 0 ? void 0 : _c.command)) !== null && _d !== void 0 ? _d : [
|
|
2146
2120
|
context.packageManagerInfo.isClassic
|
|
2147
2121
|
? "yarn audit"
|
|
2148
2122
|
: "yarn npm audit --environment production", // yarn 2
|
|
2149
2123
|
]),
|
|
2150
2124
|
],
|
|
2151
2125
|
allow_failure: true,
|
|
2152
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
2126
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_e = buildConfig.audit) === null || _e === void 0 ? void 0 : _e.artifactsReports, (_f = buildConfig.audit) === null || _f === void 0 ? void 0 : _f.artifacts),
|
|
2153
2127
|
}
|
|
2154
2128
|
: null;
|
|
2155
2129
|
const lintJob = buildConfig.lint !== false
|
|
2156
2130
|
? {
|
|
2157
2131
|
name: "👮 lint",
|
|
2158
2132
|
...base,
|
|
2159
|
-
image: (
|
|
2133
|
+
image: (_h = (_g = buildConfig.lint) === null || _g === void 0 ? void 0 : _g.jobImage) !== null && _h !== void 0 ? _h : defaultImage,
|
|
2160
2134
|
cache: (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, (0, cache_1.getNodeCache)(context)),
|
|
2161
2135
|
script: [
|
|
2162
2136
|
...(0, yarn_1.ensureNodeVersion)(context),
|
|
2163
2137
|
`cd ${context.build.dir}`,
|
|
2164
2138
|
...yarnInstall,
|
|
2165
|
-
...((
|
|
2139
|
+
...((_k = (0, utils_1.ensureArrayOrNull)((_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.command)) !== null && _k !== void 0 ? _k : ["yarn lint"]),
|
|
2166
2140
|
],
|
|
2167
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
2141
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_l = buildConfig.lint) === null || _l === void 0 ? void 0 : _l.artifactsReports, (_m = buildConfig.lint) === null || _m === void 0 ? void 0 : _m.artifacts),
|
|
2168
2142
|
}
|
|
2169
2143
|
: null;
|
|
2170
2144
|
const testJob = buildConfig.test !== false
|
|
2171
2145
|
? {
|
|
2172
2146
|
name: "🧪 test",
|
|
2173
2147
|
...base,
|
|
2174
|
-
image: (
|
|
2148
|
+
image: (_p = (_o = buildConfig.test) === null || _o === void 0 ? void 0 : _o.jobImage) !== null && _p !== void 0 ? _p : (0, runner_1.getRunnerImage)("jobs-testing-chrome"),
|
|
2175
2149
|
cache: (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, (0, cache_1.getNodeCache)(context)),
|
|
2176
2150
|
script: [
|
|
2177
2151
|
...(0, yarn_1.ensureNodeVersion)(context),
|
|
2178
2152
|
`cd ${context.build.dir}`,
|
|
2179
2153
|
...yarnInstall,
|
|
2180
|
-
...((
|
|
2154
|
+
...((_r = (0, utils_1.ensureArrayOrNull)((_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.command)) !== null && _r !== void 0 ? _r : ["yarn test"]),
|
|
2181
2155
|
],
|
|
2182
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
2156
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_s = buildConfig.test) === null || _s === void 0 ? void 0 : _s.artifactsReports, (_t = buildConfig.test) === null || _t === void 0 ? void 0 : _t.artifacts),
|
|
2183
2157
|
}
|
|
2184
2158
|
: null;
|
|
2185
2159
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
@@ -2255,7 +2229,7 @@ exports.getDockerAppCopyAndBuildScript = getDockerAppCopyAndBuildScript;
|
|
|
2255
2229
|
|
|
2256
2230
|
/***/ }),
|
|
2257
2231
|
|
|
2258
|
-
/***/
|
|
2232
|
+
/***/ 7261:
|
|
2259
2233
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
2260
2234
|
|
|
2261
2235
|
"use strict";
|
|
@@ -2295,7 +2269,6 @@ const createRailsBuildJobs = (context) => {
|
|
|
2295
2269
|
dockerBuild: {
|
|
2296
2270
|
variables: {
|
|
2297
2271
|
...context.environment.jobOnlyVars.build.envVars,
|
|
2298
|
-
...context.build.config.extraVars,
|
|
2299
2272
|
},
|
|
2300
2273
|
// custom script
|
|
2301
2274
|
script: [
|
|
@@ -2323,7 +2296,7 @@ exports.createRailsBuildJobs = createRailsBuildJobs;
|
|
|
2323
2296
|
|
|
2324
2297
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2325
2298
|
exports.createRailsJobs = void 0;
|
|
2326
|
-
const build_1 = __nccwpck_require__(
|
|
2299
|
+
const build_1 = __nccwpck_require__(7261);
|
|
2327
2300
|
const test_1 = __nccwpck_require__(7910);
|
|
2328
2301
|
const createRailsJobs = (context) => {
|
|
2329
2302
|
return [...(0, test_1.createRailsTestJobs)(context), ...(0, build_1.createRailsBuildJobs)(context)];
|
|
@@ -2343,7 +2316,7 @@ exports.createRailsTestJobs = void 0;
|
|
|
2343
2316
|
const __1 = __nccwpck_require__(603);
|
|
2344
2317
|
const utils_1 = __nccwpck_require__(2497);
|
|
2345
2318
|
const createRailsTestJobs = (context) => {
|
|
2346
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q
|
|
2319
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
2347
2320
|
// don't run tests after release
|
|
2348
2321
|
// TODO: this will be replaced by using rules
|
|
2349
2322
|
if (context.trigger === "taggedRelease") {
|
|
@@ -2357,7 +2330,6 @@ const createRailsTestJobs = (context) => {
|
|
|
2357
2330
|
const base = {
|
|
2358
2331
|
variables: {
|
|
2359
2332
|
...context.environment.jobOnlyVars.build.envVars,
|
|
2360
|
-
...((_a = buildConfig.extraVars) !== null && _a !== void 0 ? _a : {}),
|
|
2361
2333
|
},
|
|
2362
2334
|
stage: "test",
|
|
2363
2335
|
needs: [],
|
|
@@ -2381,10 +2353,10 @@ const createRailsTestJobs = (context) => {
|
|
|
2381
2353
|
name: "🛡 audit",
|
|
2382
2354
|
...base,
|
|
2383
2355
|
cache: undefined, // audit does not need bundle install and no cache
|
|
2384
|
-
image: (
|
|
2356
|
+
image: (_c = (_b = (_a = buildConfig.audit) === null || _a === void 0 ? void 0 : _a.jobImage) !== null && _b !== void 0 ? _b : buildConfig.jobImage) !== null && _c !== void 0 ? _c : defaultImage,
|
|
2385
2357
|
script: [
|
|
2386
2358
|
`cd ${context.build.dir}`,
|
|
2387
|
-
...((
|
|
2359
|
+
...((_e = (0, utils_1.ensureArrayOrNull)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : [
|
|
2388
2360
|
"gem install bundler-audit",
|
|
2389
2361
|
"bundle audit check",
|
|
2390
2362
|
]),
|
|
@@ -2397,11 +2369,11 @@ const createRailsTestJobs = (context) => {
|
|
|
2397
2369
|
name: "👮 lint",
|
|
2398
2370
|
...base,
|
|
2399
2371
|
cache: bundlerCache,
|
|
2400
|
-
image: (
|
|
2372
|
+
image: (_h = (_g = (_f = buildConfig.lint) === null || _f === void 0 ? void 0 : _f.jobImage) !== null && _g !== void 0 ? _g : buildConfig.jobImage) !== null && _h !== void 0 ? _h : defaultImage,
|
|
2401
2373
|
script: [
|
|
2402
2374
|
`cd ${context.build.dir}`,
|
|
2403
2375
|
...bundlerInstall,
|
|
2404
|
-
...((
|
|
2376
|
+
...((_k = (0, utils_1.ensureArrayOrNull)((_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.command)) !== null && _k !== void 0 ? _k : [
|
|
2405
2377
|
"bundle exec rubocop",
|
|
2406
2378
|
]),
|
|
2407
2379
|
],
|
|
@@ -2412,11 +2384,11 @@ const createRailsTestJobs = (context) => {
|
|
|
2412
2384
|
name: "🧪 test",
|
|
2413
2385
|
...base,
|
|
2414
2386
|
cache: bundlerCache,
|
|
2415
|
-
image: (
|
|
2387
|
+
image: (_o = (_m = (_l = buildConfig.test) === null || _l === void 0 ? void 0 : _l.jobImage) !== null && _m !== void 0 ? _m : buildConfig.jobImage) !== null && _o !== void 0 ? _o : defaultImage,
|
|
2416
2388
|
script: [
|
|
2417
2389
|
`cd ${context.build.dir}`,
|
|
2418
2390
|
...bundlerInstall,
|
|
2419
|
-
...((
|
|
2391
|
+
...((_q = (0, utils_1.ensureArrayOrNull)((_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.command)) !== null && _q !== void 0 ? _q : [
|
|
2420
2392
|
"bundle exec rspec",
|
|
2421
2393
|
]),
|
|
2422
2394
|
],
|
|
@@ -2733,7 +2705,6 @@ const createComponentContext = async (ctx) => {
|
|
|
2733
2705
|
const context = {
|
|
2734
2706
|
type: "component",
|
|
2735
2707
|
name: ctx.componentName,
|
|
2736
|
-
componentName: ctx.componentName,
|
|
2737
2708
|
env: ctx.env,
|
|
2738
2709
|
fullConfig: ctx.config,
|
|
2739
2710
|
componentConfig,
|
|
@@ -2906,7 +2877,6 @@ const getEnvironment = async (ctx) => {
|
|
|
2906
2877
|
slugPrefix: envContext.environmentSlugPrefix,
|
|
2907
2878
|
reviewSlug: envContext.reviewSlug,
|
|
2908
2879
|
slug: envContext.environmentSlug,
|
|
2909
|
-
shortName: env,
|
|
2910
2880
|
...variables,
|
|
2911
2881
|
};
|
|
2912
2882
|
};
|
|
@@ -2966,7 +2936,6 @@ exports.getEnvironmentContext = getEnvironmentContext;
|
|
|
2966
2936
|
|
|
2967
2937
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2968
2938
|
exports.getSecretVarNameForContext = exports.getSecretVarName = exports.getEnvironmentVariables = void 0;
|
|
2969
|
-
const lodash_1 = __nccwpck_require__(3255);
|
|
2970
2939
|
const deploy_1 = __nccwpck_require__(8483);
|
|
2971
2940
|
const BashExpression_1 = __nccwpck_require__(2376);
|
|
2972
2941
|
const types_1 = __nccwpck_require__(4466);
|
|
@@ -2974,7 +2943,6 @@ const VariableValueContainingReferences_1 = __nccwpck_require__(1592);
|
|
|
2974
2943
|
const resolveAllReferences_1 = __nccwpck_require__(6305);
|
|
2975
2944
|
const getBuildInfoVariables_1 = __nccwpck_require__(7827);
|
|
2976
2945
|
const getEnvironmentContext_1 = __nccwpck_require__(3663);
|
|
2977
|
-
const translateLegacyFromComponents_1 = __nccwpck_require__(7261);
|
|
2978
2946
|
const transformJobOnlyVars_1 = __nccwpck_require__(1552);
|
|
2979
2947
|
const envVars_1 = __nccwpck_require__(6296);
|
|
2980
2948
|
const getBasePredefinedVariables = (ctx) => {
|
|
@@ -2986,7 +2954,7 @@ const getBasePredefinedVariables = (ctx) => {
|
|
|
2986
2954
|
};
|
|
2987
2955
|
};
|
|
2988
2956
|
const getEnvironmentVariables = async (ctx, options = {}) => {
|
|
2989
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
2957
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2990
2958
|
const environmentContext = (0, getEnvironmentContext_1.getEnvironmentContext)(ctx);
|
|
2991
2959
|
const { config, env, componentName } = ctx;
|
|
2992
2960
|
const { envConfigRaw, deployConfigRaw, buildConfigRaw, envType } = environmentContext;
|
|
@@ -3003,12 +2971,8 @@ const getEnvironmentVariables = async (ctx, options = {}) => {
|
|
|
3003
2971
|
...basePredefinedVariables,
|
|
3004
2972
|
ENV_SHORT: "local",
|
|
3005
2973
|
ROOT_URL: url,
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
buildConfigRaw.type === "rails"
|
|
3009
|
-
? {}
|
|
3010
|
-
: { HOST: host }),
|
|
3011
|
-
HOST_INTERNAL: host,
|
|
2974
|
+
HOSTNAME: host,
|
|
2975
|
+
HOSTNAME_INTERNAL: host,
|
|
3012
2976
|
ROOT_URL_INTERNAL: "http://" + host,
|
|
3013
2977
|
PORT: port.toString(),
|
|
3014
2978
|
};
|
|
@@ -3017,8 +2981,8 @@ const getEnvironmentVariables = async (ctx, options = {}) => {
|
|
|
3017
2981
|
const additionalEnvVars = deployConfigRaw
|
|
3018
2982
|
? deploy_1.DEPLOY_TYPES[deployConfigRaw.type].getAdditionalEnvVars(environmentContext)
|
|
3019
2983
|
: {};
|
|
3020
|
-
const
|
|
3021
|
-
host = (_c = envConfigRaw === null || envConfigRaw === void 0 ? void 0 : envConfigRaw.host) !== null && _c !== void 0 ? _c :
|
|
2984
|
+
const HOSTNAME_INTERNAL = (_b = additionalEnvVars.HOSTNAME_INTERNAL) !== null && _b !== void 0 ? _b : "unknown-host.example.com";
|
|
2985
|
+
host = (_c = envConfigRaw === null || envConfigRaw === void 0 ? void 0 : envConfigRaw.host) !== null && _c !== void 0 ? _c : HOSTNAME_INTERNAL;
|
|
3022
2986
|
url = (0, BashExpression_1.joinBashExpressions)(["https://", host]);
|
|
3023
2987
|
predefinedVariables = {
|
|
3024
2988
|
...basePredefinedVariables,
|
|
@@ -3026,12 +2990,10 @@ const getEnvironmentVariables = async (ctx, options = {}) => {
|
|
|
3026
2990
|
...((0, types_1.isStandaloneBuildConfig)(buildConfigRaw) &&
|
|
3027
2991
|
buildConfigRaw.type === "rails"
|
|
3028
2992
|
? {}
|
|
3029
|
-
: {
|
|
2993
|
+
: { HOSTNAME: host }),
|
|
3030
2994
|
ROOT_URL: url,
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
HOST_CANONICAL: HOST_INTERNAL, // legacy alias for HOST_INTERNAL
|
|
3034
|
-
ROOT_URL_INTERNAL: (0, BashExpression_1.joinBashExpressions)(["https://", HOST_INTERNAL]),
|
|
2995
|
+
HOSTNAME_INTERNAL,
|
|
2996
|
+
ROOT_URL_INTERNAL: (0, BashExpression_1.joinBashExpressions)(["https://", HOSTNAME_INTERNAL]),
|
|
3035
2997
|
...additionalEnvVars,
|
|
3036
2998
|
};
|
|
3037
2999
|
}
|
|
@@ -3044,17 +3006,14 @@ const getEnvironmentVariables = async (ctx, options = {}) => {
|
|
|
3044
3006
|
...additionalSecretKeys,
|
|
3045
3007
|
];
|
|
3046
3008
|
const secretEnvVars = (0, envVars_1.makeSecretEnvVarMapping)(env, componentName, secretEnvVarKeys);
|
|
3047
|
-
|
|
3048
|
-
const legacyFromComponents = (_j = (_h = envConfigRaw.vars) === null || _h === void 0 ? void 0 : _h.fromComponents) !== null && _j !== void 0 ? _j : {};
|
|
3049
|
-
const publicEnvVarsRawWithLegacyFromComponents = (0, lodash_1.merge)({}, (0, translateLegacyFromComponents_1.translateLegacyFromComponents)(legacyFromComponents), publicEnvVarsRaw);
|
|
3050
|
-
const publicEnvVarsRawSanitized = (0, envVars_1.stringifyValues)(publicEnvVarsRawWithLegacyFromComponents);
|
|
3009
|
+
const publicEnvVarsRawSanitized = (0, envVars_1.stringifyValues)(publicEnvVarsRaw);
|
|
3051
3010
|
const publicEnvVarsUnresolved = Object.fromEntries(Object.entries(publicEnvVarsRawSanitized).map(([key, value]) => [
|
|
3052
3011
|
key,
|
|
3053
3012
|
(0, VariableValueContainingReferences_1.createVariableValueContainingReferencesFromString)(value, {
|
|
3054
3013
|
componentName: ctx.componentName,
|
|
3055
3014
|
}),
|
|
3056
3015
|
]));
|
|
3057
|
-
const publicEnvVars = ((
|
|
3016
|
+
const publicEnvVars = ((_h = options.shouldResolveReferences) !== null && _h !== void 0 ? _h : true)
|
|
3058
3017
|
? await (0, resolveAllReferences_1.resolveAllReferences)(publicEnvVarsUnresolved, async (otherComponentName) => {
|
|
3059
3018
|
const { envVars: otherEnvVars } = await (0, exports.getEnvironmentVariables)({
|
|
3060
3019
|
...ctx,
|
|
@@ -3229,26 +3188,6 @@ exports.transformJobOnlyVars = transformJobOnlyVars;
|
|
|
3229
3188
|
|
|
3230
3189
|
/***/ }),
|
|
3231
3190
|
|
|
3232
|
-
/***/ 7261:
|
|
3233
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
3234
|
-
|
|
3235
|
-
"use strict";
|
|
3236
|
-
|
|
3237
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3238
|
-
exports.translateLegacyFromComponents = void 0;
|
|
3239
|
-
const translateLegacyFromComponents = (fromComponents) => {
|
|
3240
|
-
return Object.fromEntries(Object.entries(fromComponents).flatMap(([componentName, variables]) => {
|
|
3241
|
-
return Object.entries(variables).map(([ourName, otherName]) => [
|
|
3242
|
-
ourName,
|
|
3243
|
-
"${" + componentName + ":" + otherName + "}",
|
|
3244
|
-
]);
|
|
3245
|
-
}));
|
|
3246
|
-
};
|
|
3247
|
-
exports.translateLegacyFromComponents = translateLegacyFromComponents;
|
|
3248
|
-
//# sourceMappingURL=translateLegacyFromComponents.js.map
|
|
3249
|
-
|
|
3250
|
-
/***/ }),
|
|
3251
|
-
|
|
3252
3191
|
/***/ 6296:
|
|
3253
3192
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
3254
3193
|
|
|
@@ -3309,7 +3248,7 @@ const stop_1 = __nccwpck_require__(2846);
|
|
|
3309
3248
|
const variables_1 = __nccwpck_require__(2422);
|
|
3310
3249
|
exports.DEPLOY_JOB_NAME = "🚀 Deploy";
|
|
3311
3250
|
const createDeployJob = (context, jobDefinition) => {
|
|
3312
|
-
var _a, _b, _c, _d, _e, _f
|
|
3251
|
+
var _a, _b, _c, _d, _e, _f;
|
|
3313
3252
|
const hasDocker = (0, docker_1.requiresDockerBuild)(context);
|
|
3314
3253
|
const isStoppable = (0, utils_1.contextIsStoppable)(context);
|
|
3315
3254
|
const autoStop = context.environment.envType === "review"
|
|
@@ -3390,13 +3329,12 @@ const createDeployJob = (context, jobDefinition) => {
|
|
|
3390
3329
|
...context.environment.envVars,
|
|
3391
3330
|
...(hasDocker ? (0, docker_1.getDockerImageVariables)(context) : {}),
|
|
3392
3331
|
...context.environment.jobOnlyVars.deploy.envVars,
|
|
3393
|
-
...(deployConfig ? (_e = deployConfig.extraVars) !== null && _e !== void 0 ? _e : {} : {}),
|
|
3394
3332
|
...jobDefinition.variables,
|
|
3395
3333
|
},
|
|
3396
3334
|
runnerVariables: {
|
|
3397
3335
|
...variables_1.DEPLOY_RUNNER_VARIABLES,
|
|
3398
|
-
...((
|
|
3399
|
-
...(deployConfig ? (
|
|
3336
|
+
...((_e = jobDefinition.runnerVariables) !== null && _e !== void 0 ? _e : {}),
|
|
3337
|
+
...(deployConfig ? (_f = deployConfig.runnerVariables) !== null && _f !== void 0 ? _f : {} : {}),
|
|
3400
3338
|
},
|
|
3401
3339
|
environment: isStoppable
|
|
3402
3340
|
? {
|
|
@@ -4263,7 +4201,7 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
|
|
|
4263
4201
|
],
|
|
4264
4202
|
getAdditionalEnvVars: (ctx) => {
|
|
4265
4203
|
const { fullName, env, componentName, deployConfigRaw } = ctx;
|
|
4266
|
-
const
|
|
4204
|
+
const HOSTNAME_INTERNAL = (0, BashExpression_1.joinBashExpressions)([
|
|
4267
4205
|
fullName,
|
|
4268
4206
|
(0, BashExpression_1.getBashVariable)((0, context_1.getSecretVarName)(env, componentName, exports.GCLOUD_RUN_CANONICAL_HOST_SUFFIX)),
|
|
4269
4207
|
], "-").toLowerCase();
|
|
@@ -4274,7 +4212,7 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
|
|
|
4274
4212
|
]))
|
|
4275
4213
|
: {};
|
|
4276
4214
|
return {
|
|
4277
|
-
|
|
4215
|
+
HOSTNAME_INTERNAL,
|
|
4278
4216
|
...getCloudSqlVariables(ctx),
|
|
4279
4217
|
...jobTriggers,
|
|
4280
4218
|
DEPLOY_CLOUD_RUN_PROJECT_ID: deployConfigRaw
|
|
@@ -4688,7 +4626,7 @@ const hasKubernetesCloudSQL = (context) => {
|
|
|
4688
4626
|
};
|
|
4689
4627
|
exports.hasKubernetesCloudSQL = hasKubernetesCloudSQL;
|
|
4690
4628
|
const createKubernetesCloudsqlBaseValues = (context) => {
|
|
4691
|
-
var _a, _b, _c
|
|
4629
|
+
var _a, _b, _c;
|
|
4692
4630
|
const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
4693
4631
|
if (!(0, types_1.isOfDeployType)(deployConfig, "kubernetes")) {
|
|
4694
4632
|
throw new Error("cannot get cloud sql config");
|
|
@@ -4698,23 +4636,11 @@ const createKubernetesCloudsqlBaseValues = (context) => {
|
|
|
4698
4636
|
throw new Error("cannot get cloud sql config");
|
|
4699
4637
|
}
|
|
4700
4638
|
const proxyCredentials = `$${(0, context_1.getSecretVarNameForContext)(context, "cloudsqlProxyCredentials")}`;
|
|
4701
|
-
if (
|
|
4702
|
-
const instanceConnectionName = `${(_c = config.projectId) !== null && _c !== void 0 ? _c : "skynet-164509"}:${(_d = config.region) !== null && _d !== void 0 ? _d : "europe-west6"}:${(_e = config.instanceId) !== null && _e !== void 0 ? _e : context.environment.envVars.KUBE_NAMESPACE}`;
|
|
4703
|
-
return {
|
|
4704
|
-
cloudsql: {
|
|
4705
|
-
enabled: config.enabled,
|
|
4706
|
-
dbUser: "postgres",
|
|
4707
|
-
instanceConnectionName,
|
|
4708
|
-
proxyCredentials,
|
|
4709
|
-
fullDbName: (_f = context.environment.envVars.KUBE_APP_NAME) !== null && _f !== void 0 ? _f : "",
|
|
4710
|
-
},
|
|
4711
|
-
};
|
|
4712
|
-
}
|
|
4713
|
-
else if (config.type === "unmanaged") {
|
|
4639
|
+
if (config.type === "unmanaged") {
|
|
4714
4640
|
return {
|
|
4715
4641
|
cloudsql: {
|
|
4716
4642
|
enabled: config.enabled,
|
|
4717
|
-
dbUser: (
|
|
4643
|
+
dbUser: (_c = config.dbUser) !== null && _c !== void 0 ? _c : "postgres",
|
|
4718
4644
|
instanceConnectionName: config.instanceConnectionName,
|
|
4719
4645
|
proxyCredentials,
|
|
4720
4646
|
fullDbName: (0, utils_1.getFullDbName)(config, context.fullConfig, context.environment.slugPrefix, context.name),
|
|
@@ -4776,8 +4702,6 @@ const createKubernetesDeployJobs = (context) => {
|
|
|
4776
4702
|
...((_c = deployConfig.additionalHelmArgs) !== null && _c !== void 0 ? _c : []),
|
|
4777
4703
|
].join(" "),
|
|
4778
4704
|
COMPONENT_NAME: context.name,
|
|
4779
|
-
/** @deprecated */
|
|
4780
|
-
BUILD_ID: context.environment.envVars.BUILD_INFO_BUILD_ID,
|
|
4781
4705
|
},
|
|
4782
4706
|
};
|
|
4783
4707
|
const clusterName = `kube-${context.environment.fullName}`;
|
|
@@ -4861,7 +4785,7 @@ exports.KUBERNETES_DEPLOY_TYPE = {
|
|
|
4861
4785
|
const domainCanonical = (deployConfigRaw && ((_a = deployConfigRaw.cluster) === null || _a === void 0 ? void 0 : _a.domainCanonical)) || // for convenience, we allow clusters to define a canonical domain, because a cluster has a fixed ip and you will usually have a domain pointing to that cluster
|
|
4862
4786
|
fullConfig.domainCanonical ||
|
|
4863
4787
|
"panter.cloud";
|
|
4864
|
-
const
|
|
4788
|
+
const HOSTNAME_INTERNAL = (0, BashExpression_1.joinBashExpressions)([
|
|
4865
4789
|
componentSlug,
|
|
4866
4790
|
...(envType === "review" && reviewSlug ? [reviewSlug] : []),
|
|
4867
4791
|
env,
|
|
@@ -4873,7 +4797,7 @@ exports.KUBERNETES_DEPLOY_TYPE = {
|
|
|
4873
4797
|
KUBE_NAMESPACE,
|
|
4874
4798
|
KUBE_APP_NAME,
|
|
4875
4799
|
KUBE_APP_NAME_PREFIX,
|
|
4876
|
-
|
|
4800
|
+
HOSTNAME_INTERNAL,
|
|
4877
4801
|
};
|
|
4878
4802
|
},
|
|
4879
4803
|
};
|
|
@@ -4946,7 +4870,6 @@ const types_1 = __nccwpck_require__(5781);
|
|
|
4946
4870
|
const cloudSql_1 = __nccwpck_require__(5129);
|
|
4947
4871
|
const kubeEnv_1 = __nccwpck_require__(6769);
|
|
4948
4872
|
const mongodb_1 = __nccwpck_require__(4139);
|
|
4949
|
-
const processSecretsAsFiles_1 = __nccwpck_require__(6089);
|
|
4950
4873
|
const createAppConfig = (context, application) => {
|
|
4951
4874
|
if (application === false) {
|
|
4952
4875
|
return {
|
|
@@ -5003,11 +4926,11 @@ const createKubeValues = (context) => {
|
|
|
5003
4926
|
: {}, ((_c = (_b = deployConfig.values) === null || _b === void 0 ? void 0 : _b.mongodb) === null || _c === void 0 ? void 0 : _c.enabled)
|
|
5004
4927
|
? (0, mongodb_1.createMongodbBaseConfig)(context)
|
|
5005
4928
|
: {});
|
|
5006
|
-
const kubeValues = (0,
|
|
4929
|
+
const kubeValues = (0, utils_1.mergeWithMergingArrays)(defaultKubeValues, {
|
|
5007
4930
|
jobs: removeFalsy(jobs),
|
|
5008
4931
|
cronjobs: removeFalsy(cronjobs),
|
|
5009
4932
|
...rest,
|
|
5010
|
-
})
|
|
4933
|
+
});
|
|
5011
4934
|
return kubeValues;
|
|
5012
4935
|
};
|
|
5013
4936
|
exports.createKubeValues = createKubeValues;
|
|
@@ -5126,40 +5049,6 @@ exports.createMongodbBaseConfig = createMongodbBaseConfig;
|
|
|
5126
5049
|
|
|
5127
5050
|
/***/ }),
|
|
5128
5051
|
|
|
5129
|
-
/***/ 6089:
|
|
5130
|
-
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
5131
|
-
|
|
5132
|
-
"use strict";
|
|
5133
|
-
|
|
5134
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5135
|
-
exports.processSecretsAsFiles = void 0;
|
|
5136
|
-
const lodash_1 = __nccwpck_require__(3255);
|
|
5137
|
-
const processSecretsAsFiles = (values) => {
|
|
5138
|
-
if (!values.secretsAsFile || values.secretsAsFile.length === 0) {
|
|
5139
|
-
return values;
|
|
5140
|
-
}
|
|
5141
|
-
// the initial idea was that we "shadow" secrets that we mount as files,
|
|
5142
|
-
// but there is a weird kubernetes issue with that (https://github.com/kubernetes/kubernetes/issues/46861),
|
|
5143
|
-
// so instead we rename the secrets and append _content, so that inside kuberentes, we can use the original name to contain the path and name+_content as the actual content
|
|
5144
|
-
return {
|
|
5145
|
-
...values,
|
|
5146
|
-
env: {
|
|
5147
|
-
...values.env,
|
|
5148
|
-
secret: {
|
|
5149
|
-
...(0, lodash_1.omit)(values.env.secret, values.secretsAsFile),
|
|
5150
|
-
...Object.fromEntries(values.secretsAsFile.map((key) => [
|
|
5151
|
-
key + "_content",
|
|
5152
|
-
values.env.secret[key],
|
|
5153
|
-
])),
|
|
5154
|
-
},
|
|
5155
|
-
},
|
|
5156
|
-
};
|
|
5157
|
-
};
|
|
5158
|
-
exports.processSecretsAsFiles = processSecretsAsFiles;
|
|
5159
|
-
//# sourceMappingURL=processSecretsAsFiles.js.map
|
|
5160
|
-
|
|
5161
|
-
/***/ }),
|
|
5162
|
-
|
|
5163
5052
|
/***/ 4986:
|
|
5164
5053
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
5165
5054
|
|
|
@@ -5340,30 +5229,6 @@ __exportStar(__nccwpck_require__(2990), exports);
|
|
|
5340
5229
|
|
|
5341
5230
|
/***/ }),
|
|
5342
5231
|
|
|
5343
|
-
/***/ 1792:
|
|
5344
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
5345
|
-
|
|
5346
|
-
"use strict";
|
|
5347
|
-
|
|
5348
|
-
var _a;
|
|
5349
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5350
|
-
// we can't import the package.json directly, because the bundling process will inline it
|
|
5351
|
-
// but the version is only set during deployement, when its already bundled
|
|
5352
|
-
// instead we need to use require.main.path to get the path of the main module, which is actually the file in the bin
|
|
5353
|
-
// this will point to the root package.json
|
|
5354
|
-
let ownPkg = { version: "0.0.0" };
|
|
5355
|
-
try {
|
|
5356
|
-
const path = ((_a = require.main) === null || _a === void 0 ? void 0 : _a.path) + "/../package.json";
|
|
5357
|
-
ownPkg = require(path);
|
|
5358
|
-
}
|
|
5359
|
-
catch (e) {
|
|
5360
|
-
// ignore, currently in the gitlab-includes, this doesn't work
|
|
5361
|
-
}
|
|
5362
|
-
exports["default"] = ownPkg;
|
|
5363
|
-
//# sourceMappingURL=packageInfos.js.map
|
|
5364
|
-
|
|
5365
|
-
/***/ }),
|
|
5366
|
-
|
|
5367
5232
|
/***/ 3579:
|
|
5368
5233
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
5369
5234
|
|
|
@@ -5738,7 +5603,7 @@ const getFullReferencedJobNameFromWorkspace = (referencedJobName, workspaceName,
|
|
|
5738
5603
|
const getJobName = (need) => (0, lodash_1.isObject)(need) ? need.job : need;
|
|
5739
5604
|
const makeGitlabJob = (context, job, allJobs, baseRules) => {
|
|
5740
5605
|
var _a, _b;
|
|
5741
|
-
const { environment, envMode, needsStages,
|
|
5606
|
+
const { environment, envMode, needsStages, name, needs, jobTags, script, variables, runnerVariables, when, ...rest } = job;
|
|
5742
5607
|
const stage = envMode === "stagePerEnv" ? `${job.stage} ${context.env}` : job.stage;
|
|
5743
5608
|
const deduplicatedGitlabNeeds = getGitlabNeeds(context, job, allJobs);
|
|
5744
5609
|
const fullJobName = getFullJobName({
|
|
@@ -5862,7 +5727,7 @@ function deduplicateNeeds(needs) {
|
|
|
5862
5727
|
? [...new Map(needs.map((n) => [(0, lodash_1.isObject)(n) ? n.job : n, n])).values()]
|
|
5863
5728
|
: undefined;
|
|
5864
5729
|
}
|
|
5865
|
-
function getGitlabNeedsForComponentJob(context, { needsStages, needs
|
|
5730
|
+
function getGitlabNeedsForComponentJob(context, { needsStages, needs }, allJobs) {
|
|
5866
5731
|
const needsFromStages = needsStages === null || needsStages === void 0 ? void 0 : needsStages.flatMap((n) => {
|
|
5867
5732
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
5868
5733
|
const componentName = context.name;
|
|
@@ -5896,8 +5761,6 @@ function getGitlabNeedsForComponentJob(context, { needsStages, needs, needsOther
|
|
|
5896
5761
|
const cleanedNeeds = [
|
|
5897
5762
|
...(needsFromStages !== null && needsFromStages !== void 0 ? needsFromStages : []),
|
|
5898
5763
|
...(needs !== null && needs !== void 0 ? needs : []),
|
|
5899
|
-
// pull in legacy needs from other component, which is now identical to needs
|
|
5900
|
-
...(needsOtherComponent !== null && needsOtherComponent !== void 0 ? needsOtherComponent : []),
|
|
5901
5764
|
];
|
|
5902
5765
|
return cleanedNeeds === null || cleanedNeeds === void 0 ? void 0 : cleanedNeeds.map((n) => {
|
|
5903
5766
|
var _a;
|
|
@@ -6599,22 +6462,18 @@ exports.removeUndefined = removeUndefined;
|
|
|
6599
6462
|
/***/ }),
|
|
6600
6463
|
|
|
6601
6464
|
/***/ 2228:
|
|
6602
|
-
/***/ (
|
|
6465
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
6603
6466
|
|
|
6604
6467
|
"use strict";
|
|
6605
6468
|
|
|
6606
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6607
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
6608
|
-
};
|
|
6609
6469
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6610
6470
|
exports.writeYamlfile = exports.yamlStringifyOptions = exports.writeGeneratedFile = exports.getAutoGeneratedHeader = void 0;
|
|
6611
6471
|
const promises_1 = __nccwpck_require__(3292);
|
|
6612
6472
|
const yaml_1 = __nccwpck_require__(8033);
|
|
6613
|
-
const packageInfos_1 = __importDefault(__nccwpck_require__(1792));
|
|
6614
6473
|
const getAutoGeneratedHeader = (commentChar) => {
|
|
6615
6474
|
return [
|
|
6616
6475
|
"-------------------------------------------------",
|
|
6617
|
-
`🐱 🔨 This file is generated by catladder
|
|
6476
|
+
`🐱 🔨 This file is generated by catladder`,
|
|
6618
6477
|
`🚨 Do not edit this file manually 🚨`,
|
|
6619
6478
|
"-------------------------------------------------",
|
|
6620
6479
|
]
|