@catladder/cli 0.0.0-next-51c86d8a โ 0.0.0-next-9a3feef4
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 +54 -131
- package/dist/bundles/cli/index.js +54 -131
- 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/custom/testJob.js +10 -11
- package/dist/pipeline/src/build/custom/testJob.js.map +1 -1
- package/dist/pipeline/src/build/node/cache.js +1 -0
- 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 +9 -19
- package/dist/pipeline/src/context/getEnvironmentVariables.js.map +1 -1
- package/dist/pipeline/src/context/resolveReferences.d.ts +0 -3
- package/dist/pipeline/src/context/resolveReferences.js +1 -10
- package/dist/pipeline/src/context/resolveReferences.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 +0 -8
- 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/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -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
|
@@ -4231,7 +4231,7 @@ const constants_1 = __nccwpck_require__(82786);
|
|
|
4231
4231
|
const writeBuildInfo_1 = __nccwpck_require__(99578);
|
|
4232
4232
|
const writeDotEnv_1 = __nccwpck_require__(48052);
|
|
4233
4233
|
const createAppBuildJob = (context, { script, variables, runnerVariables, cache, ...def }) => {
|
|
4234
|
-
var _a
|
|
4234
|
+
var _a;
|
|
4235
4235
|
return (0, lodash_1.merge)({
|
|
4236
4236
|
name: constants_1.APP_BUILD_JOB_NAME,
|
|
4237
4237
|
envMode: "jobPerEnv",
|
|
@@ -4245,14 +4245,13 @@ const createAppBuildJob = (context, { script, variables, runnerVariables, cache,
|
|
|
4245
4245
|
? {
|
|
4246
4246
|
...context.environment.envVars,
|
|
4247
4247
|
...context.environment.jobOnlyVars.build.envVars,
|
|
4248
|
-
...((_a = context.build.config.extraVars) !== null && _a !== void 0 ? _a : {}),
|
|
4249
4248
|
}
|
|
4250
4249
|
: {}),
|
|
4251
4250
|
},
|
|
4252
4251
|
runnerVariables: {
|
|
4253
4252
|
...constants_1.RUNNER_BUILD_RESOURCE_VARIABLES,
|
|
4254
4253
|
...(runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {}),
|
|
4255
|
-
...((
|
|
4254
|
+
...((_a = context.build.config.runnerVariables) !== null && _a !== void 0 ? _a : {}),
|
|
4256
4255
|
},
|
|
4257
4256
|
script: [
|
|
4258
4257
|
...(context.type === "component"
|
|
@@ -4652,7 +4651,7 @@ const RUNNER_CUSTOM_TEST_VARIABLES = {
|
|
|
4652
4651
|
KUBERNETES_MEMORY_LIMIT: "4Gi",
|
|
4653
4652
|
};
|
|
4654
4653
|
const createCustomTestJobs = (context) => {
|
|
4655
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q
|
|
4654
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
4656
4655
|
// don't run tests after release
|
|
4657
4656
|
// TODO: this will be replaced by using rules
|
|
4658
4657
|
if (context.trigger === "taggedRelease") {
|
|
@@ -4666,7 +4665,6 @@ const createCustomTestJobs = (context) => {
|
|
|
4666
4665
|
variables: {
|
|
4667
4666
|
APP_PATH: context.build.dir,
|
|
4668
4667
|
...context.environment.jobOnlyVars.build.envVars,
|
|
4669
|
-
...((_a = buildConfig.extraVars) !== null && _a !== void 0 ? _a : {}),
|
|
4670
4668
|
},
|
|
4671
4669
|
runnerVariables: RUNNER_CUSTOM_TEST_VARIABLES,
|
|
4672
4670
|
services: buildConfig.jobServices,
|
|
@@ -4679,29 +4677,29 @@ const createCustomTestJobs = (context) => {
|
|
|
4679
4677
|
? {
|
|
4680
4678
|
name: "๐ก audit",
|
|
4681
4679
|
...base,
|
|
4682
|
-
image: (
|
|
4680
|
+
image: (_b = (_a = buildConfig.audit) === null || _a === void 0 ? void 0 : _a.jobImage) !== null && _b !== void 0 ? _b : buildConfig.jobImage,
|
|
4683
4681
|
cache: undefined,
|
|
4684
|
-
script: [...(0, utils_1.ensureArray)((
|
|
4682
|
+
script: [...(0, utils_1.ensureArray)((_c = buildConfig.audit) === null || _c === void 0 ? void 0 : _c.command)],
|
|
4685
4683
|
allow_failure: true,
|
|
4686
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
4684
|
+
...(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),
|
|
4687
4685
|
}
|
|
4688
4686
|
: null;
|
|
4689
4687
|
const lintJob = buildConfig.lint
|
|
4690
4688
|
? {
|
|
4691
4689
|
name: "๐ฎ lint",
|
|
4692
4690
|
...base,
|
|
4693
|
-
image: (
|
|
4694
|
-
script: [...(0, utils_1.ensureArray)((
|
|
4695
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
4691
|
+
image: (_g = (_f = buildConfig.lint) === null || _f === void 0 ? void 0 : _f.jobImage) !== null && _g !== void 0 ? _g : buildConfig.jobImage,
|
|
4692
|
+
script: [...(0, utils_1.ensureArray)((_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.command)],
|
|
4693
|
+
...(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),
|
|
4696
4694
|
}
|
|
4697
4695
|
: null;
|
|
4698
4696
|
const testJob = buildConfig.test
|
|
4699
4697
|
? {
|
|
4700
4698
|
name: "๐งช test",
|
|
4701
4699
|
...base,
|
|
4702
|
-
image: (
|
|
4703
|
-
script: [...(0, utils_1.ensureArray)((
|
|
4704
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
4700
|
+
image: (_m = (_l = buildConfig.test) === null || _l === void 0 ? void 0 : _l.jobImage) !== null && _m !== void 0 ? _m : buildConfig.jobImage,
|
|
4701
|
+
script: [...(0, utils_1.ensureArray)((_o = buildConfig.test) === null || _o === void 0 ? void 0 : _o.command)],
|
|
4702
|
+
...(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),
|
|
4705
4703
|
}
|
|
4706
4704
|
: null;
|
|
4707
4705
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
@@ -5048,6 +5046,7 @@ const getYarnCache = (context, policy = "pull-push") => {
|
|
|
5048
5046
|
return [
|
|
5049
5047
|
{
|
|
5050
5048
|
scope: componentIsInWorkspace ? "global" : "buildDir",
|
|
5049
|
+
pathMode: componentIsInWorkspace ? "absolute" : "relative",
|
|
5051
5050
|
key: "yarn",
|
|
5052
5051
|
policy,
|
|
5053
5052
|
paths: [".yarn"],
|
|
@@ -5239,7 +5238,7 @@ const constants_1 = __nccwpck_require__(31765);
|
|
|
5239
5238
|
const yarn_1 = __nccwpck_require__(45043);
|
|
5240
5239
|
const createJobCache_1 = __nccwpck_require__(10340);
|
|
5241
5240
|
const createNodeTestJobs = (context) => {
|
|
5242
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t
|
|
5241
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
5243
5242
|
// don't run tests after release
|
|
5244
5243
|
// TODO: this will be replaced by using rules
|
|
5245
5244
|
if (context.trigger === "taggedRelease") {
|
|
@@ -5257,7 +5256,6 @@ const createNodeTestJobs = (context) => {
|
|
|
5257
5256
|
...(context.type === "component"
|
|
5258
5257
|
? {
|
|
5259
5258
|
...context.environment.jobOnlyVars.build.envVars,
|
|
5260
|
-
...((_a = context.build.config.extraVars) !== null && _a !== void 0 ? _a : {}),
|
|
5261
5259
|
}
|
|
5262
5260
|
: {}),
|
|
5263
5261
|
},
|
|
@@ -5272,48 +5270,48 @@ const createNodeTestJobs = (context) => {
|
|
|
5272
5270
|
? {
|
|
5273
5271
|
name: "๐ก audit",
|
|
5274
5272
|
...base,
|
|
5275
|
-
image: (
|
|
5273
|
+
image: (_b = (_a = buildConfig.audit) === null || _a === void 0 ? void 0 : _a.jobImage) !== null && _b !== void 0 ? _b : defaultImage,
|
|
5276
5274
|
cache: undefined, // audit does not need yarn install and no cache
|
|
5277
5275
|
script: [
|
|
5278
5276
|
`cd ${context.build.dir}`,
|
|
5279
|
-
...((
|
|
5277
|
+
...((_d = (0, utils_1.ensureArrayOrNull)((_c = buildConfig.audit) === null || _c === void 0 ? void 0 : _c.command)) !== null && _d !== void 0 ? _d : [
|
|
5280
5278
|
context.packageManagerInfo.isClassic
|
|
5281
5279
|
? "yarn audit"
|
|
5282
5280
|
: "yarn npm audit --environment production", // yarn 2
|
|
5283
5281
|
]),
|
|
5284
5282
|
],
|
|
5285
5283
|
allow_failure: true,
|
|
5286
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
5284
|
+
...(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),
|
|
5287
5285
|
}
|
|
5288
5286
|
: null;
|
|
5289
5287
|
const lintJob = buildConfig.lint !== false
|
|
5290
5288
|
? {
|
|
5291
5289
|
name: "๐ฎ lint",
|
|
5292
5290
|
...base,
|
|
5293
|
-
image: (
|
|
5291
|
+
image: (_h = (_g = buildConfig.lint) === null || _g === void 0 ? void 0 : _g.jobImage) !== null && _h !== void 0 ? _h : defaultImage,
|
|
5294
5292
|
cache: (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, (0, cache_1.getNodeCache)(context)),
|
|
5295
5293
|
script: [
|
|
5296
5294
|
...(0, yarn_1.ensureNodeVersion)(context),
|
|
5297
5295
|
`cd ${context.build.dir}`,
|
|
5298
5296
|
...yarnInstall,
|
|
5299
|
-
...((
|
|
5297
|
+
...((_k = (0, utils_1.ensureArrayOrNull)((_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.command)) !== null && _k !== void 0 ? _k : ["yarn lint"]),
|
|
5300
5298
|
],
|
|
5301
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
5299
|
+
...(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),
|
|
5302
5300
|
}
|
|
5303
5301
|
: null;
|
|
5304
5302
|
const testJob = buildConfig.test !== false
|
|
5305
5303
|
? {
|
|
5306
5304
|
name: "๐งช test",
|
|
5307
5305
|
...base,
|
|
5308
|
-
image: (
|
|
5306
|
+
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"),
|
|
5309
5307
|
cache: (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, (0, cache_1.getNodeCache)(context)),
|
|
5310
5308
|
script: [
|
|
5311
5309
|
...(0, yarn_1.ensureNodeVersion)(context),
|
|
5312
5310
|
`cd ${context.build.dir}`,
|
|
5313
5311
|
...yarnInstall,
|
|
5314
|
-
...((
|
|
5312
|
+
...((_r = (0, utils_1.ensureArrayOrNull)((_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.command)) !== null && _r !== void 0 ? _r : ["yarn test"]),
|
|
5315
5313
|
],
|
|
5316
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
5314
|
+
...(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),
|
|
5317
5315
|
}
|
|
5318
5316
|
: null;
|
|
5319
5317
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
@@ -5429,7 +5427,6 @@ const createRailsBuildJobs = (context) => {
|
|
|
5429
5427
|
dockerBuild: {
|
|
5430
5428
|
variables: {
|
|
5431
5429
|
...context.environment.jobOnlyVars.build.envVars,
|
|
5432
|
-
...context.build.config.extraVars,
|
|
5433
5430
|
},
|
|
5434
5431
|
// custom script
|
|
5435
5432
|
script: [
|
|
@@ -5477,7 +5474,7 @@ exports.createRailsTestJobs = void 0;
|
|
|
5477
5474
|
const __1 = __nccwpck_require__(10603);
|
|
5478
5475
|
const utils_1 = __nccwpck_require__(32497);
|
|
5479
5476
|
const createRailsTestJobs = (context) => {
|
|
5480
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q
|
|
5477
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
5481
5478
|
// don't run tests after release
|
|
5482
5479
|
// TODO: this will be replaced by using rules
|
|
5483
5480
|
if (context.trigger === "taggedRelease") {
|
|
@@ -5491,7 +5488,6 @@ const createRailsTestJobs = (context) => {
|
|
|
5491
5488
|
const base = {
|
|
5492
5489
|
variables: {
|
|
5493
5490
|
...context.environment.jobOnlyVars.build.envVars,
|
|
5494
|
-
...((_a = buildConfig.extraVars) !== null && _a !== void 0 ? _a : {}),
|
|
5495
5491
|
},
|
|
5496
5492
|
stage: "test",
|
|
5497
5493
|
needs: [],
|
|
@@ -5515,10 +5511,10 @@ const createRailsTestJobs = (context) => {
|
|
|
5515
5511
|
name: "๐ก audit",
|
|
5516
5512
|
...base,
|
|
5517
5513
|
cache: undefined, // audit does not need bundle install and no cache
|
|
5518
|
-
image: (
|
|
5514
|
+
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,
|
|
5519
5515
|
script: [
|
|
5520
5516
|
`cd ${context.build.dir}`,
|
|
5521
|
-
...((
|
|
5517
|
+
...((_e = (0, utils_1.ensureArrayOrNull)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : [
|
|
5522
5518
|
"gem install bundler-audit",
|
|
5523
5519
|
"bundle audit check",
|
|
5524
5520
|
]),
|
|
@@ -5531,11 +5527,11 @@ const createRailsTestJobs = (context) => {
|
|
|
5531
5527
|
name: "๐ฎ lint",
|
|
5532
5528
|
...base,
|
|
5533
5529
|
cache: bundlerCache,
|
|
5534
|
-
image: (
|
|
5530
|
+
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,
|
|
5535
5531
|
script: [
|
|
5536
5532
|
`cd ${context.build.dir}`,
|
|
5537
5533
|
...bundlerInstall,
|
|
5538
|
-
...((
|
|
5534
|
+
...((_k = (0, utils_1.ensureArrayOrNull)((_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.command)) !== null && _k !== void 0 ? _k : [
|
|
5539
5535
|
"bundle exec rubocop",
|
|
5540
5536
|
]),
|
|
5541
5537
|
],
|
|
@@ -5546,11 +5542,11 @@ const createRailsTestJobs = (context) => {
|
|
|
5546
5542
|
name: "๐งช test",
|
|
5547
5543
|
...base,
|
|
5548
5544
|
cache: bundlerCache,
|
|
5549
|
-
image: (
|
|
5545
|
+
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,
|
|
5550
5546
|
script: [
|
|
5551
5547
|
`cd ${context.build.dir}`,
|
|
5552
5548
|
...bundlerInstall,
|
|
5553
|
-
...((
|
|
5549
|
+
...((_q = (0, utils_1.ensureArrayOrNull)((_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.command)) !== null && _q !== void 0 ? _q : [
|
|
5554
5550
|
"bundle exec rspec",
|
|
5555
5551
|
]),
|
|
5556
5552
|
],
|
|
@@ -5867,7 +5863,6 @@ const createComponentContext = async (ctx) => {
|
|
|
5867
5863
|
const context = {
|
|
5868
5864
|
type: "component",
|
|
5869
5865
|
name: ctx.componentName,
|
|
5870
|
-
componentName: ctx.componentName,
|
|
5871
5866
|
env: ctx.env,
|
|
5872
5867
|
fullConfig: ctx.config,
|
|
5873
5868
|
componentConfig,
|
|
@@ -6040,7 +6035,6 @@ const getEnvironment = async (ctx) => {
|
|
|
6040
6035
|
slugPrefix: envContext.environmentSlugPrefix,
|
|
6041
6036
|
reviewSlug: envContext.reviewSlug,
|
|
6042
6037
|
slug: envContext.environmentSlug,
|
|
6043
|
-
shortName: env,
|
|
6044
6038
|
...variables,
|
|
6045
6039
|
};
|
|
6046
6040
|
};
|
|
@@ -6100,7 +6094,6 @@ exports.getEnvironmentContext = getEnvironmentContext;
|
|
|
6100
6094
|
|
|
6101
6095
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6102
6096
|
exports.getSecretVarNameForContext = exports.getSecretVarName = exports.getEnvironmentVariables = void 0;
|
|
6103
|
-
const lodash_1 = __nccwpck_require__(23255);
|
|
6104
6097
|
const deploy_1 = __nccwpck_require__(68483);
|
|
6105
6098
|
const BashExpression_1 = __nccwpck_require__(42376);
|
|
6106
6099
|
const types_1 = __nccwpck_require__(84466);
|
|
@@ -6118,7 +6111,7 @@ const getBasePredefinedVariables = (ctx) => {
|
|
|
6118
6111
|
};
|
|
6119
6112
|
};
|
|
6120
6113
|
const getEnvironmentVariables = async (ctx, alreadyVisited = {}) => {
|
|
6121
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
6114
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
6122
6115
|
const environmentContext = (0, getEnvironmentContext_1.getEnvironmentContext)(ctx);
|
|
6123
6116
|
const { config, env, componentName } = ctx;
|
|
6124
6117
|
const { envConfigRaw, deployConfigRaw, buildConfigRaw, envType } = environmentContext;
|
|
@@ -6135,12 +6128,8 @@ const getEnvironmentVariables = async (ctx, alreadyVisited = {}) => {
|
|
|
6135
6128
|
...basePredefinedVariables,
|
|
6136
6129
|
ENV_SHORT: "local",
|
|
6137
6130
|
ROOT_URL: url,
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
buildConfigRaw.type === "rails"
|
|
6141
|
-
? {}
|
|
6142
|
-
: { HOST: host }),
|
|
6143
|
-
HOST_INTERNAL: host,
|
|
6131
|
+
HOSTNAME: host,
|
|
6132
|
+
HOSTNAME_INTERNAL: host,
|
|
6144
6133
|
ROOT_URL_INTERNAL: "http://" + host,
|
|
6145
6134
|
PORT: port.toString(),
|
|
6146
6135
|
};
|
|
@@ -6149,8 +6138,8 @@ const getEnvironmentVariables = async (ctx, alreadyVisited = {}) => {
|
|
|
6149
6138
|
const additionalEnvVars = deployConfigRaw
|
|
6150
6139
|
? deploy_1.DEPLOY_TYPES[deployConfigRaw.type].getAdditionalEnvVars(environmentContext)
|
|
6151
6140
|
: {};
|
|
6152
|
-
const
|
|
6153
|
-
host = (_c = envConfigRaw === null || envConfigRaw === void 0 ? void 0 : envConfigRaw.host) !== null && _c !== void 0 ? _c :
|
|
6141
|
+
const HOSTNAME_INTERNAL = (_b = additionalEnvVars.HOSTNAME_INTERNAL) !== null && _b !== void 0 ? _b : "unknown-host.example.com";
|
|
6142
|
+
host = (_c = envConfigRaw === null || envConfigRaw === void 0 ? void 0 : envConfigRaw.host) !== null && _c !== void 0 ? _c : HOSTNAME_INTERNAL;
|
|
6154
6143
|
url = (0, BashExpression_1.joinBashExpressions)(["https://", host]);
|
|
6155
6144
|
predefinedVariables = {
|
|
6156
6145
|
...basePredefinedVariables,
|
|
@@ -6158,12 +6147,10 @@ const getEnvironmentVariables = async (ctx, alreadyVisited = {}) => {
|
|
|
6158
6147
|
...((0, types_1.isStandaloneBuildConfig)(buildConfigRaw) &&
|
|
6159
6148
|
buildConfigRaw.type === "rails"
|
|
6160
6149
|
? {}
|
|
6161
|
-
: {
|
|
6150
|
+
: { HOSTNAME: host }),
|
|
6162
6151
|
ROOT_URL: url,
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
HOST_CANONICAL: HOST_INTERNAL, // legacy alias for HOST_INTERNAL
|
|
6166
|
-
ROOT_URL_INTERNAL: (0, BashExpression_1.joinBashExpressions)(["https://", HOST_INTERNAL]),
|
|
6152
|
+
HOSTNAME_INTERNAL,
|
|
6153
|
+
ROOT_URL_INTERNAL: (0, BashExpression_1.joinBashExpressions)(["https://", HOSTNAME_INTERNAL]),
|
|
6167
6154
|
...additionalEnvVars,
|
|
6168
6155
|
};
|
|
6169
6156
|
}
|
|
@@ -6176,10 +6163,7 @@ const getEnvironmentVariables = async (ctx, alreadyVisited = {}) => {
|
|
|
6176
6163
|
...additionalSecretKeys,
|
|
6177
6164
|
];
|
|
6178
6165
|
const secretEnvVars = (0, envVars_1.makeSecretEnvVarMapping)(env, componentName, secretEnvVarKeys);
|
|
6179
|
-
|
|
6180
|
-
const legacyFromComponents = (_j = (_h = envConfigRaw.vars) === null || _h === void 0 ? void 0 : _h.fromComponents) !== null && _j !== void 0 ? _j : {};
|
|
6181
|
-
const publicEnvVarsRawWithLegacyFromComponents = (0, lodash_1.merge)({}, (0, resolveReferences_1.translateLegacyFromComponents)(legacyFromComponents), publicEnvVarsRaw);
|
|
6182
|
-
const publicEnvVarsRawSanitized = (0, envVars_1.stringifyValues)(publicEnvVarsRawWithLegacyFromComponents);
|
|
6166
|
+
const publicEnvVarsRawSanitized = (0, envVars_1.stringifyValues)(publicEnvVarsRaw);
|
|
6183
6167
|
const envVarsRaw = addIndexVar({
|
|
6184
6168
|
...predefinedVariables,
|
|
6185
6169
|
...secretEnvVars,
|
|
@@ -6318,7 +6302,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6318
6302
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
6319
6303
|
};
|
|
6320
6304
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6321
|
-
exports.
|
|
6305
|
+
exports.resolveReferences = void 0;
|
|
6322
6306
|
const lodash_1 = __nccwpck_require__(23255);
|
|
6323
6307
|
const replaceAsync_1 = __importDefault(__nccwpck_require__(72233));
|
|
6324
6308
|
// regex to resolve references in catladder variables
|
|
@@ -6368,15 +6352,6 @@ const resolveReferences = async (vars, getOtherVariables, alreadyVisitedBase = {
|
|
|
6368
6352
|
})));
|
|
6369
6353
|
};
|
|
6370
6354
|
exports.resolveReferences = resolveReferences;
|
|
6371
|
-
const translateLegacyFromComponents = (fromComponents) => {
|
|
6372
|
-
return Object.fromEntries(Object.entries(fromComponents).flatMap(([componentName, variables]) => {
|
|
6373
|
-
return Object.entries(variables).map(([ourName, otherName]) => [
|
|
6374
|
-
ourName,
|
|
6375
|
-
"${" + componentName + ":" + otherName + "}",
|
|
6376
|
-
]);
|
|
6377
|
-
}));
|
|
6378
|
-
};
|
|
6379
|
-
exports.translateLegacyFromComponents = translateLegacyFromComponents;
|
|
6380
6355
|
//# sourceMappingURL=resolveReferences.js.map
|
|
6381
6356
|
|
|
6382
6357
|
/***/ }),
|
|
@@ -6482,7 +6457,7 @@ const stop_1 = __nccwpck_require__(82846);
|
|
|
6482
6457
|
const variables_1 = __nccwpck_require__(82422);
|
|
6483
6458
|
exports.DEPLOY_JOB_NAME = "๐ Deploy";
|
|
6484
6459
|
const createDeployJob = (context, jobDefinition) => {
|
|
6485
|
-
var _a, _b, _c, _d, _e, _f
|
|
6460
|
+
var _a, _b, _c, _d, _e, _f;
|
|
6486
6461
|
const hasDocker = (0, docker_1.requiresDockerBuild)(context);
|
|
6487
6462
|
const isStoppable = (0, utils_1.contextIsStoppable)(context);
|
|
6488
6463
|
const autoStop = context.environment.envType === "review"
|
|
@@ -6561,13 +6536,12 @@ const createDeployJob = (context, jobDefinition) => {
|
|
|
6561
6536
|
...context.environment.envVars,
|
|
6562
6537
|
...(hasDocker ? (0, docker_1.getDockerImageVariables)(context) : {}),
|
|
6563
6538
|
...context.environment.jobOnlyVars.deploy.envVars,
|
|
6564
|
-
...(deployConfig ? (_e = deployConfig.extraVars) !== null && _e !== void 0 ? _e : {} : {}),
|
|
6565
6539
|
...jobDefinition.variables,
|
|
6566
6540
|
},
|
|
6567
6541
|
runnerVariables: {
|
|
6568
6542
|
...variables_1.DEPLOY_RUNNER_VARIABLES,
|
|
6569
|
-
...((
|
|
6570
|
-
...(deployConfig ? (
|
|
6543
|
+
...((_e = jobDefinition.runnerVariables) !== null && _e !== void 0 ? _e : {}),
|
|
6544
|
+
...(deployConfig ? (_f = deployConfig.runnerVariables) !== null && _f !== void 0 ? _f : {} : {}),
|
|
6571
6545
|
},
|
|
6572
6546
|
environment: isStoppable
|
|
6573
6547
|
? {
|
|
@@ -7416,7 +7390,7 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
|
|
|
7416
7390
|
],
|
|
7417
7391
|
getAdditionalEnvVars: (ctx) => {
|
|
7418
7392
|
const { fullName, env, componentName, deployConfigRaw } = ctx;
|
|
7419
|
-
const
|
|
7393
|
+
const HOSTNAME_INTERNAL = (0, BashExpression_1.joinBashExpressions)([
|
|
7420
7394
|
fullName,
|
|
7421
7395
|
(0, BashExpression_1.getBashVariable)((0, context_1.getSecretVarName)(env, componentName, exports.GCLOUD_RUN_CANONICAL_HOST_SUFFIX)),
|
|
7422
7396
|
], "-").toLowerCase();
|
|
@@ -7427,7 +7401,7 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
|
|
|
7427
7401
|
]))
|
|
7428
7402
|
: {};
|
|
7429
7403
|
return {
|
|
7430
|
-
|
|
7404
|
+
HOSTNAME_INTERNAL,
|
|
7431
7405
|
...getCloudSqlVariables(ctx),
|
|
7432
7406
|
...jobTriggers,
|
|
7433
7407
|
DEPLOY_CLOUD_RUN_PROJECT_ID: deployConfigRaw
|
|
@@ -7839,7 +7813,7 @@ const hasKubernetesCloudSQL = (context) => {
|
|
|
7839
7813
|
};
|
|
7840
7814
|
exports.hasKubernetesCloudSQL = hasKubernetesCloudSQL;
|
|
7841
7815
|
const createKubernetesCloudsqlBaseValues = (context) => {
|
|
7842
|
-
var _a, _b, _c
|
|
7816
|
+
var _a, _b, _c;
|
|
7843
7817
|
const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
7844
7818
|
if (!(0, types_1.isOfDeployType)(deployConfig, "kubernetes")) {
|
|
7845
7819
|
throw new Error("cannot get cloud sql config");
|
|
@@ -7849,23 +7823,11 @@ const createKubernetesCloudsqlBaseValues = (context) => {
|
|
|
7849
7823
|
throw new Error("cannot get cloud sql config");
|
|
7850
7824
|
}
|
|
7851
7825
|
const proxyCredentials = `$${(0, context_1.getSecretVarNameForContext)(context, "cloudsqlProxyCredentials")}`;
|
|
7852
|
-
if (
|
|
7853
|
-
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}`;
|
|
7826
|
+
if (config.type === "unmanaged") {
|
|
7854
7827
|
return {
|
|
7855
7828
|
cloudsql: {
|
|
7856
7829
|
enabled: config.enabled,
|
|
7857
|
-
dbUser: "postgres",
|
|
7858
|
-
instanceConnectionName,
|
|
7859
|
-
proxyCredentials,
|
|
7860
|
-
fullDbName: (_f = context.environment.envVars.KUBE_APP_NAME) !== null && _f !== void 0 ? _f : "",
|
|
7861
|
-
},
|
|
7862
|
-
};
|
|
7863
|
-
}
|
|
7864
|
-
else if (config.type === "unmanaged") {
|
|
7865
|
-
return {
|
|
7866
|
-
cloudsql: {
|
|
7867
|
-
enabled: config.enabled,
|
|
7868
|
-
dbUser: (_g = config.dbUser) !== null && _g !== void 0 ? _g : "postgres",
|
|
7830
|
+
dbUser: (_c = config.dbUser) !== null && _c !== void 0 ? _c : "postgres",
|
|
7869
7831
|
instanceConnectionName: config.instanceConnectionName,
|
|
7870
7832
|
proxyCredentials,
|
|
7871
7833
|
fullDbName: (0, utils_1.getFullDbName)(config, context.fullConfig, context.environment.slugPrefix, context.name),
|
|
@@ -7927,8 +7889,6 @@ const createKubernetesDeployJobs = (context) => {
|
|
|
7927
7889
|
...((_c = deployConfig.additionalHelmArgs) !== null && _c !== void 0 ? _c : []),
|
|
7928
7890
|
].join(" "),
|
|
7929
7891
|
COMPONENT_NAME: context.name,
|
|
7930
|
-
/** @deprecated */
|
|
7931
|
-
BUILD_ID: context.environment.envVars.BUILD_INFO_BUILD_ID,
|
|
7932
7892
|
},
|
|
7933
7893
|
};
|
|
7934
7894
|
const clusterName = `kube-${context.environment.fullName}`;
|
|
@@ -8012,7 +7972,7 @@ exports.KUBERNETES_DEPLOY_TYPE = {
|
|
|
8012
7972
|
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
|
|
8013
7973
|
fullConfig.domainCanonical ||
|
|
8014
7974
|
"panter.cloud";
|
|
8015
|
-
const
|
|
7975
|
+
const HOSTNAME_INTERNAL = (0, BashExpression_1.joinBashExpressions)([
|
|
8016
7976
|
componentSlug,
|
|
8017
7977
|
...(envType === "review" && reviewSlug ? [reviewSlug] : []),
|
|
8018
7978
|
env,
|
|
@@ -8024,7 +7984,7 @@ exports.KUBERNETES_DEPLOY_TYPE = {
|
|
|
8024
7984
|
KUBE_NAMESPACE,
|
|
8025
7985
|
KUBE_APP_NAME,
|
|
8026
7986
|
KUBE_APP_NAME_PREFIX,
|
|
8027
|
-
|
|
7987
|
+
HOSTNAME_INTERNAL,
|
|
8028
7988
|
};
|
|
8029
7989
|
},
|
|
8030
7990
|
};
|
|
@@ -8097,7 +8057,6 @@ const types_1 = __nccwpck_require__(75781);
|
|
|
8097
8057
|
const cloudSql_1 = __nccwpck_require__(45129);
|
|
8098
8058
|
const kubeEnv_1 = __nccwpck_require__(66769);
|
|
8099
8059
|
const mongodb_1 = __nccwpck_require__(24139);
|
|
8100
|
-
const processSecretsAsFiles_1 = __nccwpck_require__(6089);
|
|
8101
8060
|
const createAppConfig = (context, application) => {
|
|
8102
8061
|
if (application === false) {
|
|
8103
8062
|
return {
|
|
@@ -8154,11 +8113,11 @@ const createKubeValues = (context) => {
|
|
|
8154
8113
|
: {}, ((_c = (_b = deployConfig.values) === null || _b === void 0 ? void 0 : _b.mongodb) === null || _c === void 0 ? void 0 : _c.enabled)
|
|
8155
8114
|
? (0, mongodb_1.createMongodbBaseConfig)(context)
|
|
8156
8115
|
: {});
|
|
8157
|
-
const kubeValues = (0,
|
|
8116
|
+
const kubeValues = (0, utils_1.mergeWithMergingArrays)(defaultKubeValues, {
|
|
8158
8117
|
jobs: removeFalsy(jobs),
|
|
8159
8118
|
cronjobs: removeFalsy(cronjobs),
|
|
8160
8119
|
...rest,
|
|
8161
|
-
})
|
|
8120
|
+
});
|
|
8162
8121
|
return kubeValues;
|
|
8163
8122
|
};
|
|
8164
8123
|
exports.createKubeValues = createKubeValues;
|
|
@@ -8277,40 +8236,6 @@ exports.createMongodbBaseConfig = createMongodbBaseConfig;
|
|
|
8277
8236
|
|
|
8278
8237
|
/***/ }),
|
|
8279
8238
|
|
|
8280
|
-
/***/ 6089:
|
|
8281
|
-
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
8282
|
-
|
|
8283
|
-
"use strict";
|
|
8284
|
-
|
|
8285
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8286
|
-
exports.processSecretsAsFiles = void 0;
|
|
8287
|
-
const lodash_1 = __nccwpck_require__(23255);
|
|
8288
|
-
const processSecretsAsFiles = (values) => {
|
|
8289
|
-
if (!values.secretsAsFile || values.secretsAsFile.length === 0) {
|
|
8290
|
-
return values;
|
|
8291
|
-
}
|
|
8292
|
-
// the initial idea was that we "shadow" secrets that we mount as files,
|
|
8293
|
-
// but there is a weird kubernetes issue with that (https://github.com/kubernetes/kubernetes/issues/46861),
|
|
8294
|
-
// 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
|
|
8295
|
-
return {
|
|
8296
|
-
...values,
|
|
8297
|
-
env: {
|
|
8298
|
-
...values.env,
|
|
8299
|
-
secret: {
|
|
8300
|
-
...(0, lodash_1.omit)(values.env.secret, values.secretsAsFile),
|
|
8301
|
-
...Object.fromEntries(values.secretsAsFile.map((key) => [
|
|
8302
|
-
key + "_content",
|
|
8303
|
-
values.env.secret[key],
|
|
8304
|
-
])),
|
|
8305
|
-
},
|
|
8306
|
-
},
|
|
8307
|
-
};
|
|
8308
|
-
};
|
|
8309
|
-
exports.processSecretsAsFiles = processSecretsAsFiles;
|
|
8310
|
-
//# sourceMappingURL=processSecretsAsFiles.js.map
|
|
8311
|
-
|
|
8312
|
-
/***/ }),
|
|
8313
|
-
|
|
8314
8239
|
/***/ 44986:
|
|
8315
8240
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
8316
8241
|
|
|
@@ -8887,7 +8812,7 @@ const getFullReferencedJobNameFromWorkspace = (referencedJobName, workspaceName,
|
|
|
8887
8812
|
const getJobName = (need) => (0, lodash_1.isObject)(need) ? need.job : need;
|
|
8888
8813
|
const makeGitlabJob = (context, job, allJobs, baseRules) => {
|
|
8889
8814
|
var _a, _b;
|
|
8890
|
-
const { environment, envMode, needsStages,
|
|
8815
|
+
const { environment, envMode, needsStages, name, needs, jobTags, script, variables, runnerVariables, when, ...rest } = job;
|
|
8891
8816
|
const stage = envMode === "stagePerEnv" ? `${job.stage} ${context.env}` : job.stage;
|
|
8892
8817
|
const deduplicatedGitlabNeeds = getGitlabNeeds(context, job, allJobs);
|
|
8893
8818
|
const fullJobName = getFullJobName({
|
|
@@ -9011,7 +8936,7 @@ function deduplicateNeeds(needs) {
|
|
|
9011
8936
|
? [...new Map(needs.map((n) => [(0, lodash_1.isObject)(n) ? n.job : n, n])).values()]
|
|
9012
8937
|
: undefined;
|
|
9013
8938
|
}
|
|
9014
|
-
function getGitlabNeedsForComponentJob(context, { needsStages, needs
|
|
8939
|
+
function getGitlabNeedsForComponentJob(context, { needsStages, needs }, allJobs) {
|
|
9015
8940
|
const needsFromStages = needsStages === null || needsStages === void 0 ? void 0 : needsStages.flatMap((n) => {
|
|
9016
8941
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
9017
8942
|
const componentName = context.name;
|
|
@@ -9045,8 +8970,6 @@ function getGitlabNeedsForComponentJob(context, { needsStages, needs, needsOther
|
|
|
9045
8970
|
const cleanedNeeds = [
|
|
9046
8971
|
...(needsFromStages !== null && needsFromStages !== void 0 ? needsFromStages : []),
|
|
9047
8972
|
...(needs !== null && needs !== void 0 ? needs : []),
|
|
9048
|
-
// pull in legacy needs from other component, which is now identical to needs
|
|
9049
|
-
...(needsOtherComponent !== null && needsOtherComponent !== void 0 ? needsOtherComponent : []),
|
|
9050
8973
|
];
|
|
9051
8974
|
return cleanedNeeds === null || cleanedNeeds === void 0 ? void 0 : cleanedNeeds.map((n) => {
|
|
9052
8975
|
var _a;
|
|
@@ -11,7 +11,7 @@ const constants_1 = require("./constants");
|
|
|
11
11
|
const writeBuildInfo_1 = require("./writeBuildInfo");
|
|
12
12
|
const writeDotEnv_1 = require("./writeDotEnv");
|
|
13
13
|
const createAppBuildJob = (context, { script, variables, runnerVariables, cache, ...def }) => {
|
|
14
|
-
var _a
|
|
14
|
+
var _a;
|
|
15
15
|
return (0, lodash_1.merge)({
|
|
16
16
|
name: constants_1.APP_BUILD_JOB_NAME,
|
|
17
17
|
envMode: "jobPerEnv",
|
|
@@ -25,14 +25,13 @@ const createAppBuildJob = (context, { script, variables, runnerVariables, cache,
|
|
|
25
25
|
? {
|
|
26
26
|
...context.environment.envVars,
|
|
27
27
|
...context.environment.jobOnlyVars.build.envVars,
|
|
28
|
-
...((_a = context.build.config.extraVars) !== null && _a !== void 0 ? _a : {}),
|
|
29
28
|
}
|
|
30
29
|
: {}),
|
|
31
30
|
},
|
|
32
31
|
runnerVariables: {
|
|
33
32
|
...constants_1.RUNNER_BUILD_RESOURCE_VARIABLES,
|
|
34
33
|
...(runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {}),
|
|
35
|
-
...((
|
|
34
|
+
...((_a = context.build.config.runnerVariables) !== null && _a !== void 0 ? _a : {}),
|
|
36
35
|
},
|
|
37
36
|
script: [
|
|
38
37
|
...(context.type === "component"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAppBuildJob.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/base/createAppBuildJob.ts"],"names":[],"mappings":";;;AAAA,mCAA+B;AAM/B,6BAAuC;AAGvC,uCAA0C;AAC1C,gFAA8E;AAC9E,4DAAyE;AACzE,uCAAiD;AACjD,2CAGqB;AACrB,qDAAkD;AAClD,+CAGuB;AAGhB,MAAM,iBAAiB,GAAG,CAC/B,OAAoE,EACpE,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,GAAG,GAAG,EAAyB,EAC9D,EAAE;;IAChB,OAAO,IAAA,cAAK,EACV;QACE,IAAI,EAAE,8BAAkB;QACxB,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,IAAA,kBAAc,EAAC,cAAc,CAAC;QACrC,KAAK,EAAE,EAAE;QACT,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAA,+CAA8B,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS;QACzE,SAAS,EAAE;YACT,GAAG,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAC;YACpB,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW;gBAC9B,CAAC,CAAC;oBACE,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO;oBAC9B,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO;
|
|
1
|
+
{"version":3,"file":"createAppBuildJob.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/base/createAppBuildJob.ts"],"names":[],"mappings":";;;AAAA,mCAA+B;AAM/B,6BAAuC;AAGvC,uCAA0C;AAC1C,gFAA8E;AAC9E,4DAAyE;AACzE,uCAAiD;AACjD,2CAGqB;AACrB,qDAAkD;AAClD,+CAGuB;AAGhB,MAAM,iBAAiB,GAAG,CAC/B,OAAoE,EACpE,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,GAAG,GAAG,EAAyB,EAC9D,EAAE;;IAChB,OAAO,IAAA,cAAK,EACV;QACE,IAAI,EAAE,8BAAkB;QACxB,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,IAAA,kBAAc,EAAC,cAAc,CAAC;QACrC,KAAK,EAAE,EAAE;QACT,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAA,+CAA8B,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS;QACzE,SAAS,EAAE;YACT,GAAG,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAC;YACpB,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW;gBAC9B,CAAC,CAAC;oBACE,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO;oBAC9B,GAAG,OAAO,CAAC,WAAW,CAAC,WA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|
KUBERNETES_MEMORY_LIMIT: "4Gi",
|
|
12
12
|
};
|
|
13
13
|
const createCustomTestJobs = (context) => {
|
|
14
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q
|
|
14
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
15
15
|
// don't run tests after release
|
|
16
16
|
// TODO: this will be replaced by using rules
|
|
17
17
|
if (context.trigger === "taggedRelease") {
|
|
@@ -25,7 +25,6 @@ const createCustomTestJobs = (context) => {
|
|
|
25
25
|
variables: {
|
|
26
26
|
APP_PATH: context.build.dir,
|
|
27
27
|
...context.environment.jobOnlyVars.build.envVars,
|
|
28
|
-
...((_a = buildConfig.extraVars) !== null && _a !== void 0 ? _a : {}),
|
|
29
28
|
},
|
|
30
29
|
runnerVariables: RUNNER_CUSTOM_TEST_VARIABLES,
|
|
31
30
|
services: buildConfig.jobServices,
|
|
@@ -38,29 +37,29 @@ const createCustomTestJobs = (context) => {
|
|
|
38
37
|
? {
|
|
39
38
|
name: "๐ก audit",
|
|
40
39
|
...base,
|
|
41
|
-
image: (
|
|
40
|
+
image: (_b = (_a = buildConfig.audit) === null || _a === void 0 ? void 0 : _a.jobImage) !== null && _b !== void 0 ? _b : buildConfig.jobImage,
|
|
42
41
|
cache: undefined,
|
|
43
|
-
script: [...(0, utils_1.ensureArray)((
|
|
42
|
+
script: [...(0, utils_1.ensureArray)((_c = buildConfig.audit) === null || _c === void 0 ? void 0 : _c.command)],
|
|
44
43
|
allow_failure: true,
|
|
45
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
44
|
+
...(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),
|
|
46
45
|
}
|
|
47
46
|
: null;
|
|
48
47
|
const lintJob = buildConfig.lint
|
|
49
48
|
? {
|
|
50
49
|
name: "๐ฎ lint",
|
|
51
50
|
...base,
|
|
52
|
-
image: (
|
|
53
|
-
script: [...(0, utils_1.ensureArray)((
|
|
54
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
51
|
+
image: (_g = (_f = buildConfig.lint) === null || _f === void 0 ? void 0 : _f.jobImage) !== null && _g !== void 0 ? _g : buildConfig.jobImage,
|
|
52
|
+
script: [...(0, utils_1.ensureArray)((_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.command)],
|
|
53
|
+
...(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),
|
|
55
54
|
}
|
|
56
55
|
: null;
|
|
57
56
|
const testJob = buildConfig.test
|
|
58
57
|
? {
|
|
59
58
|
name: "๐งช test",
|
|
60
59
|
...base,
|
|
61
|
-
image: (
|
|
62
|
-
script: [...(0, utils_1.ensureArray)((
|
|
63
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
60
|
+
image: (_m = (_l = buildConfig.test) === null || _l === void 0 ? void 0 : _l.jobImage) !== null && _m !== void 0 ? _m : buildConfig.jobImage,
|
|
61
|
+
script: [...(0, utils_1.ensureArray)((_o = buildConfig.test) === null || _o === void 0 ? void 0 : _o.command)],
|
|
62
|
+
...(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),
|
|
64
63
|
}
|
|
65
64
|
: null;
|
|
66
65
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testJob.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/custom/testJob.ts"],"names":[],"mappings":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