@catladder/cli 0.0.0-next-84c974cd โ†’ 0.0.0-next-e2e4f00a

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.
Files changed (52) hide show
  1. package/dist/bundles/catenv/index.js +132 -53
  2. package/dist/bundles/cli/index.js +132 -53
  3. package/dist/pipeline/src/build/base/createAppBuildJob.js +3 -2
  4. package/dist/pipeline/src/build/base/createAppBuildJob.js.map +1 -1
  5. package/dist/pipeline/src/build/custom/testJob.js +11 -10
  6. package/dist/pipeline/src/build/custom/testJob.js.map +1 -1
  7. package/dist/pipeline/src/build/node/cache.js +1 -0
  8. package/dist/pipeline/src/build/node/cache.js.map +1 -1
  9. package/dist/pipeline/src/build/node/testJob.js +11 -10
  10. package/dist/pipeline/src/build/node/testJob.js.map +1 -1
  11. package/dist/pipeline/src/build/rails/build.js +1 -0
  12. package/dist/pipeline/src/build/rails/build.js.map +1 -1
  13. package/dist/pipeline/src/build/rails/test.js +8 -7
  14. package/dist/pipeline/src/build/rails/test.js.map +1 -1
  15. package/dist/pipeline/src/build/types.d.ts +10 -0
  16. package/dist/pipeline/src/build/types.js.map +1 -1
  17. package/dist/pipeline/src/context/createComponentContext.js +1 -0
  18. package/dist/pipeline/src/context/createComponentContext.js.map +1 -1
  19. package/dist/pipeline/src/context/getEnvironment.js +1 -0
  20. package/dist/pipeline/src/context/getEnvironment.js.map +1 -1
  21. package/dist/pipeline/src/context/getEnvironmentVariables.d.ts +5 -2
  22. package/dist/pipeline/src/context/getEnvironmentVariables.js +19 -9
  23. package/dist/pipeline/src/context/getEnvironmentVariables.js.map +1 -1
  24. package/dist/pipeline/src/context/resolveReferences.d.ts +3 -0
  25. package/dist/pipeline/src/context/resolveReferences.js +10 -1
  26. package/dist/pipeline/src/context/resolveReferences.js.map +1 -1
  27. package/dist/pipeline/src/deploy/base/deploy.js +4 -3
  28. package/dist/pipeline/src/deploy/base/deploy.js.map +1 -1
  29. package/dist/pipeline/src/deploy/cloudRun/index.js +2 -2
  30. package/dist/pipeline/src/deploy/cloudRun/index.js.map +1 -1
  31. package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.js +15 -3
  32. package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.js.map +1 -1
  33. package/dist/pipeline/src/deploy/kubernetes/deployJob.js +2 -0
  34. package/dist/pipeline/src/deploy/kubernetes/deployJob.js.map +1 -1
  35. package/dist/pipeline/src/deploy/kubernetes/index.js +2 -2
  36. package/dist/pipeline/src/deploy/kubernetes/index.js.map +1 -1
  37. package/dist/pipeline/src/deploy/kubernetes/kubeValues.d.ts +2 -1
  38. package/dist/pipeline/src/deploy/kubernetes/kubeValues.js +3 -2
  39. package/dist/pipeline/src/deploy/kubernetes/kubeValues.js.map +1 -1
  40. package/dist/pipeline/src/deploy/kubernetes/processSecretsAsFiles.d.ts +85 -0
  41. package/dist/pipeline/src/deploy/kubernetes/processSecretsAsFiles.js +27 -0
  42. package/dist/pipeline/src/deploy/kubernetes/processSecretsAsFiles.js.map +1 -0
  43. package/dist/pipeline/src/deploy/types/base.d.ts +6 -0
  44. package/dist/pipeline/src/deploy/types/kubernetes.d.ts +34 -1
  45. package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.js +4 -2
  46. package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.js.map +1 -1
  47. package/dist/pipeline/src/types/config.d.ts +8 -0
  48. package/dist/pipeline/src/types/context.d.ts +8 -0
  49. package/dist/pipeline/src/types/context.js.map +1 -1
  50. package/dist/pipeline/src/types/jobs.d.ts +8 -0
  51. package/dist/tsconfig.tsbuildinfo +1 -1
  52. package/package.json +1 -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, _b;
4235
4235
  return (0, lodash_1.merge)({
4236
4236
  name: constants_1.APP_BUILD_JOB_NAME,
4237
4237
  envMode: "jobPerEnv",
@@ -4245,13 +4245,14 @@ 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 : {}),
4248
4249
  }
4249
4250
  : {}),
4250
4251
  },
4251
4252
  runnerVariables: {
4252
4253
  ...constants_1.RUNNER_BUILD_RESOURCE_VARIABLES,
4253
4254
  ...(runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {}),
4254
- ...((_a = context.build.config.runnerVariables) !== null && _a !== void 0 ? _a : {}),
4255
+ ...((_b = context.build.config.runnerVariables) !== null && _b !== void 0 ? _b : {}),
4255
4256
  },
4256
4257
  script: [
4257
4258
  ...(context.type === "component"
@@ -4651,7 +4652,7 @@ const RUNNER_CUSTOM_TEST_VARIABLES = {
4651
4652
  KUBERNETES_MEMORY_LIMIT: "4Gi",
4652
4653
  };
4653
4654
  const createCustomTestJobs = (context) => {
4654
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
4655
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
4655
4656
  // don't run tests after release
4656
4657
  // TODO: this will be replaced by using rules
4657
4658
  if (context.trigger === "taggedRelease") {
@@ -4665,6 +4666,7 @@ const createCustomTestJobs = (context) => {
4665
4666
  variables: {
4666
4667
  APP_PATH: context.build.dir,
4667
4668
  ...context.environment.jobOnlyVars.build.envVars,
4669
+ ...((_a = buildConfig.extraVars) !== null && _a !== void 0 ? _a : {}),
4668
4670
  },
4669
4671
  runnerVariables: RUNNER_CUSTOM_TEST_VARIABLES,
4670
4672
  services: buildConfig.jobServices,
@@ -4677,29 +4679,29 @@ const createCustomTestJobs = (context) => {
4677
4679
  ? {
4678
4680
  name: "๐Ÿ›ก audit",
4679
4681
  ...base,
4680
- image: (_b = (_a = buildConfig.audit) === null || _a === void 0 ? void 0 : _a.jobImage) !== null && _b !== void 0 ? _b : buildConfig.jobImage,
4682
+ image: (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : buildConfig.jobImage,
4681
4683
  cache: undefined,
4682
- script: [...(0, utils_1.ensureArray)((_c = buildConfig.audit) === null || _c === void 0 ? void 0 : _c.command)],
4684
+ script: [...(0, utils_1.ensureArray)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)],
4683
4685
  allow_failure: true,
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),
4686
+ ...(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),
4685
4687
  }
4686
4688
  : null;
4687
4689
  const lintJob = buildConfig.lint
4688
4690
  ? {
4689
4691
  name: "๐Ÿ‘ฎ lint",
4690
4692
  ...base,
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),
4693
+ image: (_h = (_g = buildConfig.lint) === null || _g === void 0 ? void 0 : _g.jobImage) !== null && _h !== void 0 ? _h : buildConfig.jobImage,
4694
+ script: [...(0, utils_1.ensureArray)((_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.command)],
4695
+ ...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.artifactsReports, (_l = buildConfig.lint) === null || _l === void 0 ? void 0 : _l.artifacts),
4694
4696
  }
4695
4697
  : null;
4696
4698
  const testJob = buildConfig.test
4697
4699
  ? {
4698
4700
  name: "๐Ÿงช test",
4699
4701
  ...base,
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),
4702
+ image: (_o = (_m = buildConfig.test) === null || _m === void 0 ? void 0 : _m.jobImage) !== null && _o !== void 0 ? _o : buildConfig.jobImage,
4703
+ script: [...(0, utils_1.ensureArray)((_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.command)],
4704
+ ...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.artifactsReports, (_r = buildConfig.test) === null || _r === void 0 ? void 0 : _r.artifacts),
4703
4705
  }
4704
4706
  : null;
4705
4707
  return [auditJob, lintJob, testJob].filter(utils_1.notNil);
@@ -5046,6 +5048,7 @@ const getYarnCache = (context, policy = "pull-push") => {
5046
5048
  return [
5047
5049
  {
5048
5050
  scope: componentIsInWorkspace ? "global" : "buildDir",
5051
+ pathMode: componentIsInWorkspace ? "absolute" : "relative",
5049
5052
  key: "yarn",
5050
5053
  policy,
5051
5054
  paths: [".yarn"],
@@ -5237,7 +5240,7 @@ const constants_1 = __nccwpck_require__(31765);
5237
5240
  const yarn_1 = __nccwpck_require__(45043);
5238
5241
  const createJobCache_1 = __nccwpck_require__(10340);
5239
5242
  const createNodeTestJobs = (context) => {
5240
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
5243
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
5241
5244
  // don't run tests after release
5242
5245
  // TODO: this will be replaced by using rules
5243
5246
  if (context.trigger === "taggedRelease") {
@@ -5255,6 +5258,7 @@ const createNodeTestJobs = (context) => {
5255
5258
  ...(context.type === "component"
5256
5259
  ? {
5257
5260
  ...context.environment.jobOnlyVars.build.envVars,
5261
+ ...((_a = context.build.config.extraVars) !== null && _a !== void 0 ? _a : {}),
5258
5262
  }
5259
5263
  : {}),
5260
5264
  },
@@ -5269,48 +5273,48 @@ const createNodeTestJobs = (context) => {
5269
5273
  ? {
5270
5274
  name: "๐Ÿ›ก audit",
5271
5275
  ...base,
5272
- image: (_b = (_a = buildConfig.audit) === null || _a === void 0 ? void 0 : _a.jobImage) !== null && _b !== void 0 ? _b : defaultImage,
5276
+ image: (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : defaultImage,
5273
5277
  cache: undefined, // audit does not need yarn install and no cache
5274
5278
  script: [
5275
5279
  `cd ${context.build.dir}`,
5276
- ...((_d = (0, utils_1.ensureArrayOrNull)((_c = buildConfig.audit) === null || _c === void 0 ? void 0 : _c.command)) !== null && _d !== void 0 ? _d : [
5280
+ ...((_e = (0, utils_1.ensureArrayOrNull)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : [
5277
5281
  context.packageManagerInfo.isClassic
5278
5282
  ? "yarn audit"
5279
5283
  : "yarn npm audit --environment production", // yarn 2
5280
5284
  ]),
5281
5285
  ],
5282
5286
  allow_failure: true,
5283
- ...(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
+ ...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_f = buildConfig.audit) === null || _f === void 0 ? void 0 : _f.artifactsReports, (_g = buildConfig.audit) === null || _g === void 0 ? void 0 : _g.artifacts),
5284
5288
  }
5285
5289
  : null;
5286
5290
  const lintJob = buildConfig.lint !== false
5287
5291
  ? {
5288
5292
  name: "๐Ÿ‘ฎ lint",
5289
5293
  ...base,
5290
- image: (_h = (_g = buildConfig.lint) === null || _g === void 0 ? void 0 : _g.jobImage) !== null && _h !== void 0 ? _h : defaultImage,
5294
+ image: (_j = (_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.jobImage) !== null && _j !== void 0 ? _j : defaultImage,
5291
5295
  cache: (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, (0, cache_1.getNodeCache)(context)),
5292
5296
  script: [
5293
5297
  ...(0, yarn_1.ensureNodeVersion)(context),
5294
5298
  `cd ${context.build.dir}`,
5295
5299
  ...yarnInstall,
5296
- ...((_k = (0, utils_1.ensureArrayOrNull)((_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.command)) !== null && _k !== void 0 ? _k : ["yarn lint"]),
5300
+ ...((_l = (0, utils_1.ensureArrayOrNull)((_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.command)) !== null && _l !== void 0 ? _l : ["yarn lint"]),
5297
5301
  ],
5298
- ...(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
+ ...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_m = buildConfig.lint) === null || _m === void 0 ? void 0 : _m.artifactsReports, (_o = buildConfig.lint) === null || _o === void 0 ? void 0 : _o.artifacts),
5299
5303
  }
5300
5304
  : null;
5301
5305
  const testJob = buildConfig.test !== false
5302
5306
  ? {
5303
5307
  name: "๐Ÿงช test",
5304
5308
  ...base,
5305
- 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
+ image: (_q = (_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.jobImage) !== null && _q !== void 0 ? _q : (0, runner_1.getRunnerImage)("jobs-testing-chrome"),
5306
5310
  cache: (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, (0, cache_1.getNodeCache)(context)),
5307
5311
  script: [
5308
5312
  ...(0, yarn_1.ensureNodeVersion)(context),
5309
5313
  `cd ${context.build.dir}`,
5310
5314
  ...yarnInstall,
5311
- ...((_r = (0, utils_1.ensureArrayOrNull)((_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.command)) !== null && _r !== void 0 ? _r : ["yarn test"]),
5315
+ ...((_s = (0, utils_1.ensureArrayOrNull)((_r = buildConfig.test) === null || _r === void 0 ? void 0 : _r.command)) !== null && _s !== void 0 ? _s : ["yarn test"]),
5312
5316
  ],
5313
- ...(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
+ ...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_t = buildConfig.test) === null || _t === void 0 ? void 0 : _t.artifactsReports, (_u = buildConfig.test) === null || _u === void 0 ? void 0 : _u.artifacts),
5314
5318
  }
5315
5319
  : null;
5316
5320
  return [auditJob, lintJob, testJob].filter(utils_1.notNil);
@@ -5426,6 +5430,7 @@ const createRailsBuildJobs = (context) => {
5426
5430
  dockerBuild: {
5427
5431
  variables: {
5428
5432
  ...context.environment.jobOnlyVars.build.envVars,
5433
+ ...context.build.config.extraVars,
5429
5434
  },
5430
5435
  // custom script
5431
5436
  script: [
@@ -5473,7 +5478,7 @@ exports.createRailsTestJobs = void 0;
5473
5478
  const __1 = __nccwpck_require__(10603);
5474
5479
  const utils_1 = __nccwpck_require__(32497);
5475
5480
  const createRailsTestJobs = (context) => {
5476
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
5481
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
5477
5482
  // don't run tests after release
5478
5483
  // TODO: this will be replaced by using rules
5479
5484
  if (context.trigger === "taggedRelease") {
@@ -5487,6 +5492,7 @@ const createRailsTestJobs = (context) => {
5487
5492
  const base = {
5488
5493
  variables: {
5489
5494
  ...context.environment.jobOnlyVars.build.envVars,
5495
+ ...((_a = buildConfig.extraVars) !== null && _a !== void 0 ? _a : {}),
5490
5496
  },
5491
5497
  stage: "test",
5492
5498
  needs: [],
@@ -5510,10 +5516,10 @@ const createRailsTestJobs = (context) => {
5510
5516
  name: "๐Ÿ›ก audit",
5511
5517
  ...base,
5512
5518
  cache: undefined, // audit does not need bundle install and no cache
5513
- 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
+ image: (_d = (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : buildConfig.jobImage) !== null && _d !== void 0 ? _d : defaultImage,
5514
5520
  script: [
5515
5521
  `cd ${context.build.dir}`,
5516
- ...((_e = (0, utils_1.ensureArrayOrNull)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : [
5522
+ ...((_f = (0, utils_1.ensureArrayOrNull)((_e = buildConfig.audit) === null || _e === void 0 ? void 0 : _e.command)) !== null && _f !== void 0 ? _f : [
5517
5523
  "gem install bundler-audit",
5518
5524
  "bundle audit check",
5519
5525
  ]),
@@ -5526,11 +5532,11 @@ const createRailsTestJobs = (context) => {
5526
5532
  name: "๐Ÿ‘ฎ lint",
5527
5533
  ...base,
5528
5534
  cache: bundlerCache,
5529
- 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
+ image: (_j = (_h = (_g = buildConfig.lint) === null || _g === void 0 ? void 0 : _g.jobImage) !== null && _h !== void 0 ? _h : buildConfig.jobImage) !== null && _j !== void 0 ? _j : defaultImage,
5530
5536
  script: [
5531
5537
  `cd ${context.build.dir}`,
5532
5538
  ...bundlerInstall,
5533
- ...((_k = (0, utils_1.ensureArrayOrNull)((_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.command)) !== null && _k !== void 0 ? _k : [
5539
+ ...((_l = (0, utils_1.ensureArrayOrNull)((_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.command)) !== null && _l !== void 0 ? _l : [
5534
5540
  "bundle exec rubocop",
5535
5541
  ]),
5536
5542
  ],
@@ -5541,11 +5547,11 @@ const createRailsTestJobs = (context) => {
5541
5547
  name: "๐Ÿงช test",
5542
5548
  ...base,
5543
5549
  cache: bundlerCache,
5544
- 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
+ image: (_p = (_o = (_m = buildConfig.test) === null || _m === void 0 ? void 0 : _m.jobImage) !== null && _o !== void 0 ? _o : buildConfig.jobImage) !== null && _p !== void 0 ? _p : defaultImage,
5545
5551
  script: [
5546
5552
  `cd ${context.build.dir}`,
5547
5553
  ...bundlerInstall,
5548
- ...((_q = (0, utils_1.ensureArrayOrNull)((_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.command)) !== null && _q !== void 0 ? _q : [
5554
+ ...((_r = (0, utils_1.ensureArrayOrNull)((_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.command)) !== null && _r !== void 0 ? _r : [
5549
5555
  "bundle exec rspec",
5550
5556
  ]),
5551
5557
  ],
@@ -5862,6 +5868,7 @@ const createComponentContext = async (ctx) => {
5862
5868
  const context = {
5863
5869
  type: "component",
5864
5870
  name: ctx.componentName,
5871
+ componentName: ctx.componentName,
5865
5872
  env: ctx.env,
5866
5873
  fullConfig: ctx.config,
5867
5874
  componentConfig,
@@ -6034,6 +6041,7 @@ const getEnvironment = async (ctx) => {
6034
6041
  slugPrefix: envContext.environmentSlugPrefix,
6035
6042
  reviewSlug: envContext.reviewSlug,
6036
6043
  slug: envContext.environmentSlug,
6044
+ shortName: env,
6037
6045
  ...variables,
6038
6046
  };
6039
6047
  };
@@ -6093,6 +6101,7 @@ exports.getEnvironmentContext = getEnvironmentContext;
6093
6101
 
6094
6102
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6095
6103
  exports.getSecretVarNameForContext = exports.getSecretVarName = exports.getEnvironmentVariables = void 0;
6104
+ const lodash_1 = __nccwpck_require__(23255);
6096
6105
  const deploy_1 = __nccwpck_require__(68483);
6097
6106
  const BashExpression_1 = __nccwpck_require__(42376);
6098
6107
  const types_1 = __nccwpck_require__(84466);
@@ -6110,7 +6119,7 @@ const getBasePredefinedVariables = (ctx) => {
6110
6119
  };
6111
6120
  };
6112
6121
  const getEnvironmentVariables = async (ctx, alreadyVisited = {}) => {
6113
- var _a, _b, _c, _d, _e, _f, _g;
6122
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
6114
6123
  const environmentContext = (0, getEnvironmentContext_1.getEnvironmentContext)(ctx);
6115
6124
  const { config, env, componentName } = ctx;
6116
6125
  const { envConfigRaw, deployConfigRaw, buildConfigRaw, envType } = environmentContext;
@@ -6127,8 +6136,12 @@ const getEnvironmentVariables = async (ctx, alreadyVisited = {}) => {
6127
6136
  ...basePredefinedVariables,
6128
6137
  ENV_SHORT: "local",
6129
6138
  ROOT_URL: url,
6130
- HOSTNAME: host,
6131
- HOSTNAME_INTERNAL: host,
6139
+ // Rails before 6.1 (mis)uses the `HOST` environment variable to specify the IP to bind to
6140
+ ...((0, types_1.isStandaloneBuildConfig)(buildConfigRaw) &&
6141
+ buildConfigRaw.type === "rails"
6142
+ ? {}
6143
+ : { HOST: host }),
6144
+ HOST_INTERNAL: host,
6132
6145
  ROOT_URL_INTERNAL: "http://" + host,
6133
6146
  PORT: port.toString(),
6134
6147
  };
@@ -6137,8 +6150,8 @@ const getEnvironmentVariables = async (ctx, alreadyVisited = {}) => {
6137
6150
  const additionalEnvVars = deployConfigRaw
6138
6151
  ? deploy_1.DEPLOY_TYPES[deployConfigRaw.type].getAdditionalEnvVars(environmentContext)
6139
6152
  : {};
6140
- const HOSTNAME_INTERNAL = (_b = additionalEnvVars.HOSTNAME_INTERNAL) !== null && _b !== void 0 ? _b : "unknown-host.example.com";
6141
- host = (_c = envConfigRaw === null || envConfigRaw === void 0 ? void 0 : envConfigRaw.host) !== null && _c !== void 0 ? _c : HOSTNAME_INTERNAL;
6153
+ const HOST_INTERNAL = (_b = additionalEnvVars.HOST_INTERNAL) !== null && _b !== void 0 ? _b : "unknown-host.example.com";
6154
+ host = (_c = envConfigRaw === null || envConfigRaw === void 0 ? void 0 : envConfigRaw.host) !== null && _c !== void 0 ? _c : HOST_INTERNAL;
6142
6155
  url = (0, BashExpression_1.joinBashExpressions)(["https://", host]);
6143
6156
  predefinedVariables = {
6144
6157
  ...basePredefinedVariables,
@@ -6146,10 +6159,12 @@ const getEnvironmentVariables = async (ctx, alreadyVisited = {}) => {
6146
6159
  ...((0, types_1.isStandaloneBuildConfig)(buildConfigRaw) &&
6147
6160
  buildConfigRaw.type === "rails"
6148
6161
  ? {}
6149
- : { HOSTNAME: host }),
6162
+ : { HOST: host }),
6150
6163
  ROOT_URL: url,
6151
- HOSTNAME_INTERNAL,
6152
- ROOT_URL_INTERNAL: (0, BashExpression_1.joinBashExpressions)(["https://", HOSTNAME_INTERNAL]),
6164
+ HOST_INTERNAL,
6165
+ /**@deprecated */
6166
+ HOST_CANONICAL: HOST_INTERNAL, // legacy alias for HOST_INTERNAL
6167
+ ROOT_URL_INTERNAL: (0, BashExpression_1.joinBashExpressions)(["https://", HOST_INTERNAL]),
6153
6168
  ...additionalEnvVars,
6154
6169
  };
6155
6170
  }
@@ -6162,7 +6177,10 @@ const getEnvironmentVariables = async (ctx, alreadyVisited = {}) => {
6162
6177
  ...additionalSecretKeys,
6163
6178
  ];
6164
6179
  const secretEnvVars = (0, envVars_1.makeSecretEnvVarMapping)(env, componentName, secretEnvVarKeys);
6165
- const publicEnvVarsRawSanitized = (0, envVars_1.stringifyValues)(publicEnvVarsRaw);
6180
+ // this is deprecated, we now support: $componentname:FOO
6181
+ const legacyFromComponents = (_j = (_h = envConfigRaw.vars) === null || _h === void 0 ? void 0 : _h.fromComponents) !== null && _j !== void 0 ? _j : {};
6182
+ const publicEnvVarsRawWithLegacyFromComponents = (0, lodash_1.merge)({}, (0, resolveReferences_1.translateLegacyFromComponents)(legacyFromComponents), publicEnvVarsRaw);
6183
+ const publicEnvVarsRawSanitized = (0, envVars_1.stringifyValues)(publicEnvVarsRawWithLegacyFromComponents);
6166
6184
  const envVarsRaw = addIndexVar({
6167
6185
  ...predefinedVariables,
6168
6186
  ...secretEnvVars,
@@ -6301,7 +6319,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
6301
6319
  return (mod && mod.__esModule) ? mod : { "default": mod };
6302
6320
  };
6303
6321
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6304
- exports.resolveReferences = void 0;
6322
+ exports.translateLegacyFromComponents = exports.resolveReferences = void 0;
6305
6323
  const lodash_1 = __nccwpck_require__(23255);
6306
6324
  const replaceAsync_1 = __importDefault(__nccwpck_require__(72233));
6307
6325
  // regex to resolve references in catladder variables
@@ -6351,6 +6369,15 @@ const resolveReferences = async (vars, getOtherVariables, alreadyVisitedBase = {
6351
6369
  })));
6352
6370
  };
6353
6371
  exports.resolveReferences = resolveReferences;
6372
+ const translateLegacyFromComponents = (fromComponents) => {
6373
+ return Object.fromEntries(Object.entries(fromComponents).flatMap(([componentName, variables]) => {
6374
+ return Object.entries(variables).map(([ourName, otherName]) => [
6375
+ ourName,
6376
+ "${" + componentName + ":" + otherName + "}",
6377
+ ]);
6378
+ }));
6379
+ };
6380
+ exports.translateLegacyFromComponents = translateLegacyFromComponents;
6354
6381
  //# sourceMappingURL=resolveReferences.js.map
6355
6382
 
6356
6383
  /***/ }),
@@ -6456,7 +6483,7 @@ const stop_1 = __nccwpck_require__(82846);
6456
6483
  const variables_1 = __nccwpck_require__(82422);
6457
6484
  exports.DEPLOY_JOB_NAME = "๐Ÿš€ Deploy";
6458
6485
  const createDeployJob = (context, jobDefinition) => {
6459
- var _a, _b, _c, _d, _e, _f;
6486
+ var _a, _b, _c, _d, _e, _f, _g;
6460
6487
  const hasDocker = (0, docker_1.requiresDockerBuild)(context);
6461
6488
  const isStoppable = (0, utils_1.contextIsStoppable)(context);
6462
6489
  const autoStop = context.environment.envType === "review"
@@ -6535,12 +6562,13 @@ const createDeployJob = (context, jobDefinition) => {
6535
6562
  ...context.environment.envVars,
6536
6563
  ...(hasDocker ? (0, docker_1.getDockerImageVariables)(context) : {}),
6537
6564
  ...context.environment.jobOnlyVars.deploy.envVars,
6565
+ ...(deployConfig ? (_e = deployConfig.extraVars) !== null && _e !== void 0 ? _e : {} : {}),
6538
6566
  ...jobDefinition.variables,
6539
6567
  },
6540
6568
  runnerVariables: {
6541
6569
  ...variables_1.DEPLOY_RUNNER_VARIABLES,
6542
- ...((_e = jobDefinition.runnerVariables) !== null && _e !== void 0 ? _e : {}),
6543
- ...(deployConfig ? (_f = deployConfig.runnerVariables) !== null && _f !== void 0 ? _f : {} : {}),
6570
+ ...((_f = jobDefinition.runnerVariables) !== null && _f !== void 0 ? _f : {}),
6571
+ ...(deployConfig ? (_g = deployConfig.runnerVariables) !== null && _g !== void 0 ? _g : {} : {}),
6544
6572
  },
6545
6573
  environment: isStoppable
6546
6574
  ? {
@@ -7389,7 +7417,7 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
7389
7417
  ],
7390
7418
  getAdditionalEnvVars: (ctx) => {
7391
7419
  const { fullName, env, componentName, deployConfigRaw } = ctx;
7392
- const HOSTNAME_INTERNAL = (0, BashExpression_1.joinBashExpressions)([
7420
+ const HOST_INTERNAL = (0, BashExpression_1.joinBashExpressions)([
7393
7421
  fullName,
7394
7422
  (0, BashExpression_1.getBashVariable)((0, context_1.getSecretVarName)(env, componentName, exports.GCLOUD_RUN_CANONICAL_HOST_SUFFIX)),
7395
7423
  ], "-").toLowerCase();
@@ -7400,7 +7428,7 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
7400
7428
  ]))
7401
7429
  : {};
7402
7430
  return {
7403
- HOSTNAME_INTERNAL,
7431
+ HOST_INTERNAL,
7404
7432
  ...getCloudSqlVariables(ctx),
7405
7433
  ...jobTriggers,
7406
7434
  DEPLOY_CLOUD_RUN_PROJECT_ID: deployConfigRaw
@@ -7812,7 +7840,7 @@ const hasKubernetesCloudSQL = (context) => {
7812
7840
  };
7813
7841
  exports.hasKubernetesCloudSQL = hasKubernetesCloudSQL;
7814
7842
  const createKubernetesCloudsqlBaseValues = (context) => {
7815
- var _a, _b, _c;
7843
+ var _a, _b, _c, _d, _e, _f, _g;
7816
7844
  const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
7817
7845
  if (!(0, types_1.isOfDeployType)(deployConfig, "kubernetes")) {
7818
7846
  throw new Error("cannot get cloud sql config");
@@ -7822,11 +7850,23 @@ const createKubernetesCloudsqlBaseValues = (context) => {
7822
7850
  throw new Error("cannot get cloud sql config");
7823
7851
  }
7824
7852
  const proxyCredentials = `$${(0, context_1.getSecretVarNameForContext)(context, "cloudsqlProxyCredentials")}`;
7825
- if (config.type === "unmanaged") {
7853
+ if ((config === null || config === void 0 ? void 0 : config.type) !== "unmanaged") {
7854
+ 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
7855
  return {
7827
7856
  cloudsql: {
7828
7857
  enabled: config.enabled,
7829
- dbUser: (_c = config.dbUser) !== null && _c !== void 0 ? _c : "postgres",
7858
+ dbUser: "postgres",
7859
+ instanceConnectionName,
7860
+ proxyCredentials,
7861
+ fullDbName: (_f = context.environment.envVars.KUBE_APP_NAME) !== null && _f !== void 0 ? _f : "",
7862
+ },
7863
+ };
7864
+ }
7865
+ else if (config.type === "unmanaged") {
7866
+ return {
7867
+ cloudsql: {
7868
+ enabled: config.enabled,
7869
+ dbUser: (_g = config.dbUser) !== null && _g !== void 0 ? _g : "postgres",
7830
7870
  instanceConnectionName: config.instanceConnectionName,
7831
7871
  proxyCredentials,
7832
7872
  fullDbName: (0, utils_1.getFullDbName)(config, context.fullConfig, context.environment.slugPrefix, context.name),
@@ -7888,6 +7928,8 @@ const createKubernetesDeployJobs = (context) => {
7888
7928
  ...((_c = deployConfig.additionalHelmArgs) !== null && _c !== void 0 ? _c : []),
7889
7929
  ].join(" "),
7890
7930
  COMPONENT_NAME: context.name,
7931
+ /** @deprecated */
7932
+ BUILD_ID: context.environment.envVars.BUILD_INFO_BUILD_ID,
7891
7933
  },
7892
7934
  };
7893
7935
  const clusterName = `kube-${context.environment.fullName}`;
@@ -7971,7 +8013,7 @@ exports.KUBERNETES_DEPLOY_TYPE = {
7971
8013
  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
7972
8014
  fullConfig.domainCanonical ||
7973
8015
  "panter.cloud";
7974
- const HOSTNAME_INTERNAL = (0, BashExpression_1.joinBashExpressions)([
8016
+ const HOST_INTERNAL = (0, BashExpression_1.joinBashExpressions)([
7975
8017
  componentSlug,
7976
8018
  ...(envType === "review" && reviewSlug ? [reviewSlug] : []),
7977
8019
  env,
@@ -7983,7 +8025,7 @@ exports.KUBERNETES_DEPLOY_TYPE = {
7983
8025
  KUBE_NAMESPACE,
7984
8026
  KUBE_APP_NAME,
7985
8027
  KUBE_APP_NAME_PREFIX,
7986
- HOSTNAME_INTERNAL,
8028
+ HOST_INTERNAL,
7987
8029
  };
7988
8030
  },
7989
8031
  };
@@ -8056,6 +8098,7 @@ const types_1 = __nccwpck_require__(75781);
8056
8098
  const cloudSql_1 = __nccwpck_require__(45129);
8057
8099
  const kubeEnv_1 = __nccwpck_require__(66769);
8058
8100
  const mongodb_1 = __nccwpck_require__(24139);
8101
+ const processSecretsAsFiles_1 = __nccwpck_require__(6089);
8059
8102
  const createAppConfig = (context, application) => {
8060
8103
  if (application === false) {
8061
8104
  return {
@@ -8112,11 +8155,11 @@ const createKubeValues = (context) => {
8112
8155
  : {}, ((_c = (_b = deployConfig.values) === null || _b === void 0 ? void 0 : _b.mongodb) === null || _c === void 0 ? void 0 : _c.enabled)
8113
8156
  ? (0, mongodb_1.createMongodbBaseConfig)(context)
8114
8157
  : {});
8115
- const kubeValues = (0, utils_1.mergeWithMergingArrays)(defaultKubeValues, {
8158
+ const kubeValues = (0, processSecretsAsFiles_1.processSecretsAsFiles)((0, utils_1.mergeWithMergingArrays)(defaultKubeValues, {
8116
8159
  jobs: removeFalsy(jobs),
8117
8160
  cronjobs: removeFalsy(cronjobs),
8118
8161
  ...rest,
8119
- });
8162
+ }));
8120
8163
  return kubeValues;
8121
8164
  };
8122
8165
  exports.createKubeValues = createKubeValues;
@@ -8235,6 +8278,40 @@ exports.createMongodbBaseConfig = createMongodbBaseConfig;
8235
8278
 
8236
8279
  /***/ }),
8237
8280
 
8281
+ /***/ 6089:
8282
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
8283
+
8284
+ "use strict";
8285
+
8286
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
8287
+ exports.processSecretsAsFiles = void 0;
8288
+ const lodash_1 = __nccwpck_require__(23255);
8289
+ const processSecretsAsFiles = (values) => {
8290
+ if (!values.secretsAsFile || values.secretsAsFile.length === 0) {
8291
+ return values;
8292
+ }
8293
+ // the initial idea was that we "shadow" secrets that we mount as files,
8294
+ // but there is a weird kubernetes issue with that (https://github.com/kubernetes/kubernetes/issues/46861),
8295
+ // 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
8296
+ return {
8297
+ ...values,
8298
+ env: {
8299
+ ...values.env,
8300
+ secret: {
8301
+ ...(0, lodash_1.omit)(values.env.secret, values.secretsAsFile),
8302
+ ...Object.fromEntries(values.secretsAsFile.map((key) => [
8303
+ key + "_content",
8304
+ values.env.secret[key],
8305
+ ])),
8306
+ },
8307
+ },
8308
+ };
8309
+ };
8310
+ exports.processSecretsAsFiles = processSecretsAsFiles;
8311
+ //# sourceMappingURL=processSecretsAsFiles.js.map
8312
+
8313
+ /***/ }),
8314
+
8238
8315
  /***/ 44986:
8239
8316
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
8240
8317
 
@@ -8811,7 +8888,7 @@ const getFullReferencedJobNameFromWorkspace = (referencedJobName, workspaceName,
8811
8888
  const getJobName = (need) => (0, lodash_1.isObject)(need) ? need.job : need;
8812
8889
  const makeGitlabJob = (context, job, allJobs, baseRules) => {
8813
8890
  var _a, _b;
8814
- const { environment, envMode, needsStages, name, needs, jobTags, script, variables, runnerVariables, when, ...rest } = job;
8891
+ const { environment, envMode, needsStages, needsOtherComponent, name, needs, jobTags, script, variables, runnerVariables, when, ...rest } = job;
8815
8892
  const stage = envMode === "stagePerEnv" ? `${job.stage} ${context.env}` : job.stage;
8816
8893
  const deduplicatedGitlabNeeds = getGitlabNeeds(context, job, allJobs);
8817
8894
  const fullJobName = getFullJobName({
@@ -8935,7 +9012,7 @@ function deduplicateNeeds(needs) {
8935
9012
  ? [...new Map(needs.map((n) => [(0, lodash_1.isObject)(n) ? n.job : n, n])).values()]
8936
9013
  : undefined;
8937
9014
  }
8938
- function getGitlabNeedsForComponentJob(context, { needsStages, needs }, allJobs) {
9015
+ function getGitlabNeedsForComponentJob(context, { needsStages, needs, needsOtherComponent }, allJobs) {
8939
9016
  const needsFromStages = needsStages === null || needsStages === void 0 ? void 0 : needsStages.flatMap((n) => {
8940
9017
  var _a, _b, _c, _d, _e, _f, _g, _h;
8941
9018
  const componentName = context.name;
@@ -8969,6 +9046,8 @@ function getGitlabNeedsForComponentJob(context, { needsStages, needs }, allJobs)
8969
9046
  const cleanedNeeds = [
8970
9047
  ...(needsFromStages !== null && needsFromStages !== void 0 ? needsFromStages : []),
8971
9048
  ...(needs !== null && needs !== void 0 ? needs : []),
9049
+ // pull in legacy needs from other component, which is now identical to needs
9050
+ ...(needsOtherComponent !== null && needsOtherComponent !== void 0 ? needsOtherComponent : []),
8972
9051
  ];
8973
9052
  return cleanedNeeds === null || cleanedNeeds === void 0 ? void 0 : cleanedNeeds.map((n) => {
8974
9053
  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, _b;
15
15
  return (0, lodash_1.merge)({
16
16
  name: constants_1.APP_BUILD_JOB_NAME,
17
17
  envMode: "jobPerEnv",
@@ -25,13 +25,14 @@ 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 : {}),
28
29
  }
29
30
  : {}),
30
31
  },
31
32
  runnerVariables: {
32
33
  ...constants_1.RUNNER_BUILD_RESOURCE_VARIABLES,
33
34
  ...(runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {}),
34
- ...((_a = context.build.config.runnerVariables) !== null && _a !== void 0 ? _a : {}),
35
+ ...((_b = context.build.config.runnerVariables) !== null && _b !== void 0 ? _b : {}),
35
36
  },
36
37
  script: [
37
38
  ...(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;iBACjD;gBACH,CAAC,CAAC,EAAE,CAAC;SACR;QACD,eAAe,EAAE;YACf,GAAG,2CAA+B;YAClC,GAAG,CAAC,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,EAAE,CAAC;YAC1B,GAAG,CAAC,MAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,mCAAI,EAAE,CAAC;SAChD;QAED,MAAM,EAAE;YACN,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW;gBAC9B,CAAC,CAAC,IAAA,kDAAoC,EAAC,OAAO,CAAC;oBAC7C,CAAC,CAAC,IAAA,yBAAW,EAAC,OAAO,CAAC;oBACtB,CAAC,CAAC,EAAE;gBACN,CAAC,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW;oBAC5B,CAAC,CAAC,OAAO,CAAC,UAAU;yBACf,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,kDAAoC,EAAC,CAAC,CAAC,CAAC;yBACtD,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,yBAAW,EAAC,CAAC,CAAC,CAAC;oBACnC,CAAC,CAAC,EAAE,CAAC;YACT,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,IAAA,+BAAc,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAChE,GAAG,IAAA,wBAAiB,EAAC,OAAO,CAAC,EAAE,wEAAwE;YACvG,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE;YACzB,GAAG,IAAA,mBAAW,EAAC,MAAM,CAAC;SACvB;QACD,SAAS,EAAE,IAAA,gDAAuB,EAAC,OAAO,CAAC;KAC5C,EACD,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC;AA9CW,QAAA,iBAAiB,qBA8C5B"}
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,G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B,CAAC,CAAC,OAAO,CAAC,UAAU;yBACf,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,kDAAoC,EAAC,CAAC,CAAC,CAAC;yBACtD,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,yBAAW,EAAC,CAAC,CAAC,CAAC;oBACnC,CAAC,CAAC,EAAE,CAAC;YACT,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,IAAA,+BAAc,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAChE,GAAG,IAAA,wBAAiB,EAAC,OAAO,CAAC,EAAE,wEAAwE;YACvG,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE;YACzB,GAAG,IAAA,mBAAW,EAAC,MAAM,CAAC;SACvB;QACD,SAAS,EAAE,IAAA,gDAAuB,EAAC,OAAO,CAAC;KAC5C,EACD,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC;AA/CW,QAAA,iBAAiB,qBA+C5B"}
@@ -11,7 +11,7 @@ const RUNNER_CUSTOM_TEST_VARIABLES = {
11
11
  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, _r;
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,6 +25,7 @@ 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 : {}),
28
29
  },
29
30
  runnerVariables: RUNNER_CUSTOM_TEST_VARIABLES,
30
31
  services: buildConfig.jobServices,
@@ -37,29 +38,29 @@ const createCustomTestJobs = (context) => {
37
38
  ? {
38
39
  name: "๐Ÿ›ก audit",
39
40
  ...base,
40
- image: (_b = (_a = buildConfig.audit) === null || _a === void 0 ? void 0 : _a.jobImage) !== null && _b !== void 0 ? _b : buildConfig.jobImage,
41
+ image: (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : buildConfig.jobImage,
41
42
  cache: undefined,
42
- script: [...(0, utils_1.ensureArray)((_c = buildConfig.audit) === null || _c === void 0 ? void 0 : _c.command)],
43
+ script: [...(0, utils_1.ensureArray)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)],
43
44
  allow_failure: true,
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),
45
+ ...(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),
45
46
  }
46
47
  : null;
47
48
  const lintJob = buildConfig.lint
48
49
  ? {
49
50
  name: "๐Ÿ‘ฎ lint",
50
51
  ...base,
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),
52
+ image: (_h = (_g = buildConfig.lint) === null || _g === void 0 ? void 0 : _g.jobImage) !== null && _h !== void 0 ? _h : buildConfig.jobImage,
53
+ script: [...(0, utils_1.ensureArray)((_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.command)],
54
+ ...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.artifactsReports, (_l = buildConfig.lint) === null || _l === void 0 ? void 0 : _l.artifacts),
54
55
  }
55
56
  : null;
56
57
  const testJob = buildConfig.test
57
58
  ? {
58
59
  name: "๐Ÿงช test",
59
60
  ...base,
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),
61
+ image: (_o = (_m = buildConfig.test) === null || _m === void 0 ? void 0 : _m.jobImage) !== null && _o !== void 0 ? _o : buildConfig.jobImage,
62
+ script: [...(0, utils_1.ensureArray)((_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.command)],
63
+ ...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.artifactsReports, (_r = buildConfig.test) === null || _r === void 0 ? void 0 : _r.artifacts),
63
64
  }
64
65
  : null;
65
66
  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":";;;AAGA,uCAAkD;AAClD,yEAAsE;AACtE,4DAAmE;AACnE,oCAAyC;AAEzC,MAAM,4BAA4B,GAAG;IACnC,sBAAsB,EAAE,MAAM;IAC9B,yBAAyB,EAAE,KAAK;IAChC,uBAAuB,EAAE,KAAK;CAC/B,CAAC;AAEK,MAAM,oBAAoB,GAAG,CAClC,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