@catladder/pipeline 0.0.0-next-e2e4f00a → 0.0.0-next-c0c5f6da

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 (107) hide show
  1. package/dist/build/base/createAppBuildJob.js +3 -3
  2. package/dist/build/custom/testJob.js +12 -12
  3. package/dist/build/node/buildJob.js +1 -1
  4. package/dist/build/node/cache.d.ts +2 -4
  5. package/dist/build/node/cache.js +3 -24
  6. package/dist/build/node/testJob.js +11 -11
  7. package/dist/build/rails/build.js +1 -1
  8. package/dist/build/rails/test.js +8 -8
  9. package/dist/build/types.d.ts +0 -10
  10. package/dist/bundles/catladder-gitlab/index.js +74 -174
  11. package/dist/constants.js +1 -1
  12. package/dist/context/__tests__/resolveReferences.test.js +0 -22
  13. package/dist/context/createComponentContext.js +0 -1
  14. package/dist/context/getEnvironment.js +1 -2
  15. package/dist/context/getEnvironmentVariables.d.ts +2 -5
  16. package/dist/context/getEnvironmentVariables.js +17 -24
  17. package/dist/context/resolveReferences.d.ts +1 -4
  18. package/dist/context/resolveReferences.js +2 -16
  19. package/dist/deploy/base/deploy.js +3 -3
  20. package/dist/deploy/cloudRun/index.js +2 -2
  21. package/dist/deploy/kubernetes/cloudSql/index.js +3 -14
  22. package/dist/deploy/kubernetes/deployJob.js +1 -3
  23. package/dist/deploy/kubernetes/index.js +2 -2
  24. package/dist/deploy/kubernetes/kubeValues.d.ts +1 -2
  25. package/dist/deploy/kubernetes/kubeValues.js +2 -3
  26. package/dist/deploy/types/base.d.ts +0 -6
  27. package/dist/deploy/types/kubernetes.d.ts +1 -34
  28. package/dist/pipeline/gitlab/createGitlabJobs.js +3 -5
  29. package/dist/tsconfig.tsbuildinfo +1 -1
  30. package/dist/types/config.d.ts +0 -8
  31. package/dist/types/context.d.ts +0 -8
  32. package/dist/types/jobs.d.ts +0 -8
  33. package/examples/__snapshots__/cloud-run-memory-limit.test.ts.snap +36 -68
  34. package/examples/__snapshots__/cloud-run-meteor-with-worker.test.ts.snap +36 -52
  35. package/examples/__snapshots__/cloud-run-nextjs.test.ts.snap +1402 -0
  36. package/examples/__snapshots__/cloud-run-no-cpu-throttling.test.ts.snap +36 -68
  37. package/examples/__snapshots__/cloud-run-no-service.test.ts.snap +36 -68
  38. package/examples/__snapshots__/cloud-run-non-public.test.ts.snap +36 -68
  39. package/examples/__snapshots__/cloud-run-post-stop-job.test.ts.snap +36 -68
  40. package/examples/__snapshots__/cloud-run-service-custom-vpc.test.ts.snap +36 -68
  41. package/examples/__snapshots__/cloud-run-service-gen2.test.ts.snap +36 -68
  42. package/examples/__snapshots__/cloud-run-service-increase-timout.test.ts.snap +36 -68
  43. package/examples/__snapshots__/cloud-run-service-with-volumes.test.ts.snap +36 -68
  44. package/examples/__snapshots__/cloud-run-storybook.test.ts.snap +36 -68
  45. package/examples/__snapshots__/cloud-run-with-ngnix.test.ts.snap +36 -68
  46. package/examples/__snapshots__/cloud-run-with-sql-reuse-db.test.ts.snap +72 -136
  47. package/examples/__snapshots__/cloud-run-with-sql.test.ts.snap +48 -84
  48. package/examples/__snapshots__/cloud-run-with-worker.test.ts.snap +36 -68
  49. package/examples/__snapshots__/custom-build-job-with-tests.test.ts.snap +36 -52
  50. package/examples/__snapshots__/custom-build-job.test.ts.snap +36 -52
  51. package/examples/__snapshots__/custom-deploy.test.ts.snap +24 -48
  52. package/examples/__snapshots__/custom-envs.test.ts.snap +18 -48
  53. package/examples/__snapshots__/custom-sbom-java.test.ts.snap +36 -52
  54. package/examples/__snapshots__/git-submodule.test.ts.snap +36 -68
  55. package/examples/__snapshots__/kubernetes-application-customization.test.ts.snap +60 -112
  56. package/examples/__snapshots__/kubernetes-with-cloud-sql.test.ts.snap +60 -112
  57. package/examples/__snapshots__/kubernetes-with-jobs.test.ts.snap +120 -224
  58. package/examples/__snapshots__/kubernetes-with-mongodb.test.ts.snap +60 -112
  59. package/examples/__snapshots__/local-dot-env.test.ts.snap +36 -68
  60. package/examples/__snapshots__/meteor-kubernetes.test.ts.snap +60 -96
  61. package/examples/__snapshots__/multiline-var.test.ts.snap +96 -180
  62. package/examples/__snapshots__/native-app.test.ts.snap +72 -132
  63. package/examples/__snapshots__/node-build-with-custom-image.test.ts.snap +36 -68
  64. package/examples/__snapshots__/node-build-with-docker-additions.test.ts.snap +36 -68
  65. package/examples/__snapshots__/rails-k8s-with-worker-dockerfile.test.ts.snap +48 -80
  66. package/examples/__snapshots__/rails-k8s-with-worker.test.ts.snap +48 -80
  67. package/examples/__snapshots__/wait-for-other-deploy.test.ts.snap +48 -96
  68. package/examples/__snapshots__/{workspace-api-www-custom-cache.test.ts.snap → workspace-api-www-turbo-cache.test.ts.snap} +81 -153
  69. package/examples/__snapshots__/workspace-api-www.test.ts.snap +76 -136
  70. package/examples/{workspace-api-www-custom-cache.test.ts → cloud-run-nextjs.test.ts} +2 -2
  71. package/examples/cloud-run-nextjs.ts +29 -0
  72. package/examples/native-app.ts +10 -6
  73. package/examples/rails-k8s-with-worker.ts +5 -1
  74. package/examples/{kubernetes-with-cloud-sql-legacy.test.ts → workspace-api-www-turbo-cache.test.ts} +2 -2
  75. package/examples/{workspace-api-www-custom-cache.ts → workspace-api-www-turbo-cache.ts} +4 -1
  76. package/examples/workspace-api-www.ts +3 -0
  77. package/package.json +1 -1
  78. package/src/build/base/createAppBuildJob.ts +0 -1
  79. package/src/build/custom/testJob.ts +0 -1
  80. package/src/build/node/buildJob.ts +2 -2
  81. package/src/build/node/cache.ts +0 -29
  82. package/src/build/node/testJob.ts +0 -1
  83. package/src/build/rails/build.ts +0 -1
  84. package/src/build/rails/test.ts +0 -1
  85. package/src/build/types.ts +0 -13
  86. package/src/context/__tests__/resolveReferences.test.ts +1 -27
  87. package/src/context/createComponentContext.ts +0 -1
  88. package/src/context/getEnvironment.ts +1 -1
  89. package/src/context/getEnvironmentVariables.ts +13 -34
  90. package/src/context/resolveReferences.ts +0 -13
  91. package/src/deploy/base/deploy.ts +1 -1
  92. package/src/deploy/cloudRun/index.ts +2 -2
  93. package/src/deploy/kubernetes/cloudSql/index.ts +1 -15
  94. package/src/deploy/kubernetes/deployJob.ts +0 -2
  95. package/src/deploy/kubernetes/index.ts +2 -2
  96. package/src/deploy/kubernetes/kubeValues.ts +5 -8
  97. package/src/deploy/types/base.ts +0 -6
  98. package/src/deploy/types/kubernetes.ts +1 -36
  99. package/src/pipeline/gitlab/createGitlabJobs.ts +1 -4
  100. package/src/types/config.ts +0 -8
  101. package/src/types/context.ts +1 -8
  102. package/src/types/jobs.ts +0 -8
  103. package/dist/deploy/kubernetes/processSecretsAsFiles.d.ts +0 -85
  104. package/dist/deploy/kubernetes/processSecretsAsFiles.js +0 -33
  105. package/examples/__snapshots__/kubernetes-with-cloud-sql-legacy.test.ts.snap +0 -1791
  106. package/examples/kubernetes-with-cloud-sql-legacy.ts +0 -35
  107. package/src/deploy/kubernetes/processSecretsAsFiles.ts +0 -35
@@ -23359,7 +23359,7 @@ var constants_1 = __nccwpck_require__(8821);
23359
23359
  var writeBuildInfo_1 = __nccwpck_require__(8014);
23360
23360
  var writeDotEnv_1 = __nccwpck_require__(2818);
23361
23361
  var createAppBuildJob = function (context, _a) {
23362
- var _b, _c;
23362
+ var _b;
23363
23363
  var script = _a.script,
23364
23364
  variables = _a.variables,
23365
23365
  runnerVariables = _a.runnerVariables,
@@ -23372,8 +23372,8 @@ var createAppBuildJob = function (context, _a) {
23372
23372
  image: (0, __1.getRunnerImage)("jobs-default"),
23373
23373
  needs: [],
23374
23374
  cache: cache ? (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, cache) : undefined,
23375
- variables: __assign(__assign({}, variables !== null && variables !== void 0 ? variables : {}), context.type === "component" ? __assign(__assign(__assign({}, context.environment.envVars), context.environment.jobOnlyVars.build.envVars), (_b = context.build.config.extraVars) !== null && _b !== void 0 ? _b : {}) : {}),
23376
- runnerVariables: __assign(__assign(__assign({}, constants_1.RUNNER_BUILD_RESOURCE_VARIABLES), runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {}), (_c = context.build.config.runnerVariables) !== null && _c !== void 0 ? _c : {}),
23375
+ variables: __assign(__assign({}, variables !== null && variables !== void 0 ? variables : {}), context.type === "component" ? __assign(__assign({}, context.environment.envVars), context.environment.jobOnlyVars.build.envVars) : {}),
23376
+ runnerVariables: __assign(__assign(__assign({}, constants_1.RUNNER_BUILD_RESOURCE_VARIABLES), runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {}), (_b = context.build.config.runnerVariables) !== null && _b !== void 0 ? _b : {}),
23377
23377
  script: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(context.type === "component" ? (0, writeDotEnv_1.componentContextNeedsBuildTimeDotEnv)(context) ? (0, writeDotEnv_1.writeDotEnv)(context) : [] : context.type === "workspace" ? context.components.filter(function (c) {
23378
23378
  return (0, writeDotEnv_1.componentContextNeedsBuildTimeDotEnv)(c);
23379
23379
  }).flatMap(function (c) {
@@ -24055,7 +24055,7 @@ var RUNNER_CUSTOM_TEST_VARIABLES = {
24055
24055
  KUBERNETES_MEMORY_LIMIT: "4Gi"
24056
24056
  };
24057
24057
  var createCustomTestJobs = function (context) {
24058
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
24058
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
24059
24059
  // don't run tests after release
24060
24060
  // TODO: this will be replaced by using rules
24061
24061
  if (context.trigger === "taggedRelease") {
@@ -24066,9 +24066,9 @@ var createCustomTestJobs = function (context) {
24066
24066
  throw new Error("deploy config is not custom");
24067
24067
  }
24068
24068
  var base = {
24069
- variables: __assign(__assign({
24069
+ variables: __assign({
24070
24070
  APP_PATH: context.build.dir
24071
- }, context.environment.jobOnlyVars.build.envVars), (_a = buildConfig.extraVars) !== null && _a !== void 0 ? _a : {}),
24071
+ }, context.environment.jobOnlyVars.build.envVars),
24072
24072
  runnerVariables: RUNNER_CUSTOM_TEST_VARIABLES,
24073
24073
  services: buildConfig.jobServices,
24074
24074
  cache: (0, createJobCache_1.createJobCacheFromConfig)(context, buildConfig),
@@ -24079,23 +24079,23 @@ var createCustomTestJobs = function (context) {
24079
24079
  var auditJob = buildConfig.audit ? __assign(__assign(__assign({
24080
24080
  name: "🛡 audit"
24081
24081
  }, base), {
24082
- image: (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : buildConfig.jobImage,
24082
+ image: (_b = (_a = buildConfig.audit) === null || _a === void 0 ? void 0 : _a.jobImage) !== null && _b !== void 0 ? _b : buildConfig.jobImage,
24083
24083
  cache: undefined,
24084
- script: __spreadArray([], __read((0, utils_1.ensureArray)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)), false),
24084
+ script: __spreadArray([], __read((0, utils_1.ensureArray)((_c = buildConfig.audit) === null || _c === void 0 ? void 0 : _c.command)), false),
24085
24085
  allow_failure: true
24086
- }), (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)) : null;
24086
+ }), (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)) : null;
24087
24087
  var lintJob = buildConfig.lint ? __assign(__assign(__assign({
24088
24088
  name: "👮 lint"
24089
24089
  }, base), {
24090
- image: (_h = (_g = buildConfig.lint) === null || _g === void 0 ? void 0 : _g.jobImage) !== null && _h !== void 0 ? _h : buildConfig.jobImage,
24091
- script: __spreadArray([], __read((0, utils_1.ensureArray)((_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.command)), false)
24092
- }), (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)) : null;
24090
+ image: (_g = (_f = buildConfig.lint) === null || _f === void 0 ? void 0 : _f.jobImage) !== null && _g !== void 0 ? _g : buildConfig.jobImage,
24091
+ script: __spreadArray([], __read((0, utils_1.ensureArray)((_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.command)), false)
24092
+ }), (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)) : null;
24093
24093
  var testJob = buildConfig.test ? __assign(__assign(__assign({
24094
24094
  name: "🧪 test"
24095
24095
  }, base), {
24096
- image: (_o = (_m = buildConfig.test) === null || _m === void 0 ? void 0 : _m.jobImage) !== null && _o !== void 0 ? _o : buildConfig.jobImage,
24097
- script: __spreadArray([], __read((0, utils_1.ensureArray)((_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.command)), false)
24098
- }), (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)) : null;
24096
+ image: (_m = (_l = buildConfig.test) === null || _l === void 0 ? void 0 : _l.jobImage) !== null && _m !== void 0 ? _m : buildConfig.jobImage,
24097
+ script: __spreadArray([], __read((0, utils_1.ensureArray)((_o = buildConfig.test) === null || _o === void 0 ? void 0 : _o.command)), false)
24098
+ }), (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)) : null;
24099
24099
  return [auditJob, lintJob, testJob].filter(utils_1.notNil);
24100
24100
  };
24101
24101
  exports.createCustomTestJobs = createCustomTestJobs;
@@ -24471,7 +24471,7 @@ var createNodeBuildJobDefinition = function (context) {
24471
24471
  var yarnInstall = (0, yarn_1.getYarnInstall)(context);
24472
24472
  return (0, createBuildJobDefinition_1.createBuildJobDefinition)(context, buildConfig, {
24473
24473
  prescript: yarnInstall,
24474
- cache: __spreadArray(__spreadArray([], __read((0, cache_1.getNodeCache)(context)), false), __read((0, cache_1.getNextCache)(context)), false)
24474
+ cache: (0, cache_1.getNodeCache)(context)
24475
24475
  });
24476
24476
  };
24477
24477
  exports.createNodeBuildJobDefinition = createNodeBuildJobDefinition;
@@ -24540,7 +24540,7 @@ var __importDefault = this && this.__importDefault || function (mod) {
24540
24540
  Object.defineProperty(exports, "__esModule", ({
24541
24541
  value: true
24542
24542
  }));
24543
- exports.getWorkspaceDefaultCaches = exports.getNextCache = exports.getNodeCache = exports.getNodeModulesCache = exports.getYarnCache = void 0;
24543
+ exports.getNodeCache = exports.getNodeModulesCache = exports.getYarnCache = void 0;
24544
24544
  var lodash_1 = __nccwpck_require__(3255);
24545
24545
  var path_1 = __nccwpck_require__(1017);
24546
24546
  var slugify_1 = __importDefault(__nccwpck_require__(4035));
@@ -24583,30 +24583,9 @@ var getNodeCache = function (context, policy) {
24583
24583
  if (policy === void 0) {
24584
24584
  policy = "pull-push";
24585
24585
  }
24586
- return __spreadArray(__spreadArray(__spreadArray([], __read((0, exports.getYarnCache)(context, policy)), false), __read((0, exports.getNodeModulesCache)(context, policy)), false), __read(context.type === "workspace" ? (0, exports.getWorkspaceDefaultCaches)(context) : []), false);
24586
+ return __spreadArray(__spreadArray([], __read((0, exports.getYarnCache)(context, policy)), false), __read((0, exports.getNodeModulesCache)(context, policy)), false);
24587
24587
  };
24588
24588
  exports.getNodeCache = getNodeCache;
24589
- var getNextCache = function (context) {
24590
- var paths = context.build.getComponentDirs("direct").map(function (c) {
24591
- return (0, path_1.join)(c, ".next/cache");
24592
- });
24593
- return [{
24594
- pathMode: "absolute",
24595
- key: "next-cache",
24596
- policy: "pull-push",
24597
- paths: paths
24598
- }];
24599
- };
24600
- exports.getNextCache = getNextCache;
24601
- var getWorkspaceDefaultCaches = function (context) {
24602
- return [{
24603
- // turbo repo
24604
- key: "turbo",
24605
- policy: "pull-push",
24606
- paths: [".turbo"]
24607
- }];
24608
- };
24609
- exports.getWorkspaceDefaultCaches = getWorkspaceDefaultCaches;
24610
24589
 
24611
24590
  /***/ }),
24612
24591
 
@@ -24829,7 +24808,7 @@ var constants_1 = __nccwpck_require__(4899);
24829
24808
  var yarn_1 = __nccwpck_require__(312);
24830
24809
  var createJobCache_1 = __nccwpck_require__(659);
24831
24810
  var createNodeTestJobs = function (context) {
24832
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
24811
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
24833
24812
  // don't run tests after release
24834
24813
  // TODO: this will be replaced by using rules
24835
24814
  if (context.trigger === "taggedRelease") {
@@ -24843,7 +24822,7 @@ var createNodeTestJobs = function (context) {
24843
24822
  var base = {
24844
24823
  variables: __assign({
24845
24824
  APP_PATH: context.build.dir
24846
- }, context.type === "component" ? __assign(__assign({}, context.environment.jobOnlyVars.build.envVars), (_a = context.build.config.extraVars) !== null && _a !== void 0 ? _a : {}) : {}),
24825
+ }, context.type === "component" ? __assign({}, context.environment.jobOnlyVars.build.envVars) : {}),
24847
24826
  runnerVariables: constants_1.NODE_RUNNER_BUILD_VARIABLES,
24848
24827
  stage: "test",
24849
24828
  needs: [],
@@ -24854,26 +24833,26 @@ var createNodeTestJobs = function (context) {
24854
24833
  var auditJob = buildConfig.audit !== false ? __assign(__assign(__assign({
24855
24834
  name: "🛡 audit"
24856
24835
  }, base), {
24857
- image: (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : defaultImage,
24836
+ image: (_b = (_a = buildConfig.audit) === null || _a === void 0 ? void 0 : _a.jobImage) !== null && _b !== void 0 ? _b : defaultImage,
24858
24837
  cache: undefined,
24859
- script: __spreadArray(["cd ".concat(context.build.dir)], __read((_e = (0, utils_1.ensureArrayOrNull)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : [context.packageManagerInfo.isClassic ? "yarn audit" : "yarn npm audit --environment production" // yarn 2
24838
+ script: __spreadArray(["cd ".concat(context.build.dir)], __read((_d = (0, utils_1.ensureArrayOrNull)((_c = buildConfig.audit) === null || _c === void 0 ? void 0 : _c.command)) !== null && _d !== void 0 ? _d : [context.packageManagerInfo.isClassic ? "yarn audit" : "yarn npm audit --environment production" // yarn 2
24860
24839
  ]), false),
24861
24840
  allow_failure: true
24862
- }), (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)) : null;
24841
+ }), (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)) : null;
24863
24842
  var lintJob = buildConfig.lint !== false ? __assign(__assign(__assign({
24864
24843
  name: "👮 lint"
24865
24844
  }, base), {
24866
- image: (_j = (_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.jobImage) !== null && _j !== void 0 ? _j : defaultImage,
24845
+ image: (_h = (_g = buildConfig.lint) === null || _g === void 0 ? void 0 : _g.jobImage) !== null && _h !== void 0 ? _h : defaultImage,
24867
24846
  cache: (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, (0, cache_1.getNodeCache)(context)),
24868
- script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), ["cd ".concat(context.build.dir)], false), __read(yarnInstall), false), __read((_l = (0, utils_1.ensureArrayOrNull)((_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.command)) !== null && _l !== void 0 ? _l : ["yarn lint"]), false)
24869
- }), (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)) : null;
24847
+ script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), ["cd ".concat(context.build.dir)], false), __read(yarnInstall), false), __read((_k = (0, utils_1.ensureArrayOrNull)((_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.command)) !== null && _k !== void 0 ? _k : ["yarn lint"]), false)
24848
+ }), (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)) : null;
24870
24849
  var testJob = buildConfig.test !== false ? __assign(__assign(__assign({
24871
24850
  name: "🧪 test"
24872
24851
  }, base), {
24873
- 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"),
24852
+ 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"),
24874
24853
  cache: (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, (0, cache_1.getNodeCache)(context)),
24875
- script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), ["cd ".concat(context.build.dir)], false), __read(yarnInstall), false), __read((_s = (0, utils_1.ensureArrayOrNull)((_r = buildConfig.test) === null || _r === void 0 ? void 0 : _r.command)) !== null && _s !== void 0 ? _s : ["yarn test"]), false)
24876
- }), (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)) : null;
24854
+ script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), ["cd ".concat(context.build.dir)], false), __read(yarnInstall), false), __read((_r = (0, utils_1.ensureArrayOrNull)((_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.command)) !== null && _r !== void 0 ? _r : ["yarn test"]), false)
24855
+ }), (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)) : null;
24877
24856
  return [auditJob, lintJob, testJob].filter(utils_1.notNil);
24878
24857
  };
24879
24858
  exports.createNodeTestJobs = createNodeTestJobs;
@@ -25046,7 +25025,7 @@ var createRailsBuildJobs = function (context) {
25046
25025
  return (0, base_1.createComponentBuildJobs)(context, {
25047
25026
  appBuild: undefined,
25048
25027
  dockerBuild: {
25049
- variables: __assign(__assign({}, context.environment.jobOnlyVars.build.envVars), context.build.config.extraVars),
25028
+ variables: __assign({}, context.environment.jobOnlyVars.build.envVars),
25050
25029
  // custom script
25051
25030
  script: __spreadArray(__spreadArray([], __read((0, docker_1.gitlabDockerLogin)(context)), false), ["cd ".concat(context.build.dir), "docker pull $DOCKER_CACHE_IMAGE || true", "wget --output-document=- https://github.com/buildpacks/pack/releases/download/v".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "/pack-v").concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "-linux.tgz | tar -zx --directory /usr/local/bin pack"), "chmod +x /usr/local/bin/pack",
25052
25031
  // replace private git ssh gem sources with https to make bundler with credentials via env var work
@@ -25162,7 +25141,7 @@ exports.createRailsTestJobs = void 0;
25162
25141
  var __1 = __nccwpck_require__(3223);
25163
25142
  var utils_1 = __nccwpck_require__(1815);
25164
25143
  var createRailsTestJobs = function (context) {
25165
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
25144
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
25166
25145
  // don't run tests after release
25167
25146
  // TODO: this will be replaced by using rules
25168
25147
  if (context.trigger === "taggedRelease") {
@@ -25174,7 +25153,7 @@ var createRailsTestJobs = function (context) {
25174
25153
  }
25175
25154
  var buildConfig = context.build.config;
25176
25155
  var base = {
25177
- variables: __assign(__assign({}, context.environment.jobOnlyVars.build.envVars), (_a = buildConfig.extraVars) !== null && _a !== void 0 ? _a : {}),
25156
+ variables: __assign({}, context.environment.jobOnlyVars.build.envVars),
25178
25157
  stage: "test",
25179
25158
  needs: [],
25180
25159
  envMode: "none"
@@ -25194,23 +25173,23 @@ var createRailsTestJobs = function (context) {
25194
25173
  name: "🛡 audit"
25195
25174
  }, base), {
25196
25175
  cache: undefined,
25197
- 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,
25198
- script: __spreadArray(["cd ".concat(context.build.dir)], __read((_f = (0, utils_1.ensureArrayOrNull)((_e = buildConfig.audit) === null || _e === void 0 ? void 0 : _e.command)) !== null && _f !== void 0 ? _f : ["gem install bundler-audit", "bundle audit check"]), false),
25176
+ 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,
25177
+ script: __spreadArray(["cd ".concat(context.build.dir)], __read((_e = (0, utils_1.ensureArrayOrNull)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : ["gem install bundler-audit", "bundle audit check"]), false),
25199
25178
  allow_failure: true
25200
25179
  }) : null;
25201
25180
  var lintJob = buildConfig.lint !== false ? __assign(__assign({
25202
25181
  name: "👮 lint"
25203
25182
  }, base), {
25204
25183
  cache: bundlerCache,
25205
- 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,
25206
- script: __spreadArray(__spreadArray(["cd ".concat(context.build.dir)], __read(bundlerInstall), false), __read((_l = (0, utils_1.ensureArrayOrNull)((_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.command)) !== null && _l !== void 0 ? _l : ["bundle exec rubocop"]), false)
25184
+ 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,
25185
+ script: __spreadArray(__spreadArray(["cd ".concat(context.build.dir)], __read(bundlerInstall), false), __read((_k = (0, utils_1.ensureArrayOrNull)((_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.command)) !== null && _k !== void 0 ? _k : ["bundle exec rubocop"]), false)
25207
25186
  }) : null;
25208
25187
  var testJob = buildConfig.test !== false ? __assign(__assign({
25209
25188
  name: "🧪 test"
25210
25189
  }, base), {
25211
25190
  cache: bundlerCache,
25212
- 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,
25213
- script: __spreadArray(__spreadArray(["cd ".concat(context.build.dir)], __read(bundlerInstall), false), __read((_r = (0, utils_1.ensureArrayOrNull)((_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.command)) !== null && _r !== void 0 ? _r : ["bundle exec rspec"]), false)
25191
+ 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,
25192
+ script: __spreadArray(__spreadArray(["cd ".concat(context.build.dir)], __read(bundlerInstall), false), __read((_q = (0, utils_1.ensureArrayOrNull)((_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.command)) !== null && _q !== void 0 ? _q : ["bundle exec rspec"]), false)
25214
25193
  }) : null;
25215
25194
  return [auditJob, lintJob, testJob].filter(utils_1.notNil);
25216
25195
  };
@@ -25763,7 +25742,7 @@ Object.defineProperty(exports, "__esModule", ({
25763
25742
  value: true
25764
25743
  }));
25765
25744
  exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
25766
- exports.PIPELINE_IMAGE_TAG = "next-e2e4f00a" || 0;
25745
+ exports.PIPELINE_IMAGE_TAG = "next-c0c5f6da" || 0;
25767
25746
  exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
25768
25747
 
25769
25748
  /***/ }),
@@ -26172,7 +26151,6 @@ var createComponentContext = function (ctx) {
26172
26151
  context = {
26173
26152
  type: "component",
26174
26153
  name: ctx.componentName,
26175
- componentName: ctx.componentName,
26176
26154
  env: ctx.env,
26177
26155
  fullConfig: ctx.config,
26178
26156
  componentConfig: componentConfig,
@@ -26642,8 +26620,7 @@ var getEnvironment = function (ctx) {
26642
26620
  fullName: envContext.fullName,
26643
26621
  slugPrefix: envContext.environmentSlugPrefix,
26644
26622
  reviewSlug: envContext.reviewSlug,
26645
- slug: envContext.environmentSlug,
26646
- shortName: env
26623
+ slug: envContext.environmentSlug
26647
26624
  }, variables)];
26648
26625
  }
26649
26626
  });
@@ -26869,7 +26846,6 @@ Object.defineProperty(exports, "__esModule", ({
26869
26846
  value: true
26870
26847
  }));
26871
26848
  exports.getSecretVarNameForContext = exports.getSecretVarName = exports.getEnvironmentVariables = void 0;
26872
- var lodash_1 = __nccwpck_require__(3255);
26873
26849
  var deploy_1 = __nccwpck_require__(1264);
26874
26850
  var BashExpression_1 = __nccwpck_require__(5879);
26875
26851
  var types_1 = __nccwpck_require__(6575);
@@ -26891,14 +26867,14 @@ var getEnvironmentVariables = function (ctx_1) {
26891
26867
  args_1[_i - 1] = arguments[_i];
26892
26868
  }
26893
26869
  return __awaiter(void 0, __spreadArray([ctx_1], __read(args_1), false), void 0, function (ctx, alreadyVisited) {
26894
- var environmentContext, config, env, componentName, envConfigRaw, deployConfigRaw, buildConfigRaw, envType, basePredefinedVariables, predefinedVariables, host, url, devLocalConfig, port, additionalEnvVars, HOST_INTERNAL, publicEnvVarsRaw, additionalSecretKeys, secretEnvVarKeys, secretEnvVars, legacyFromComponents, publicEnvVarsRawWithLegacyFromComponents, publicEnvVarsRawSanitized, envVarsRaw, envVars;
26870
+ var environmentContext, config, env, componentName, envConfigRaw, deployConfigRaw, buildConfigRaw, envType, basePredefinedVariables, predefinedVariables, host, url, devLocalConfig, port, additionalEnvVars, HOSTNAME_INTERNAL, publicEnvVarsRaw, additionalSecretKeys, secretEnvVarKeys, secretEnvVars, publicEnvVarsRawSanitized, envVarsRaw, envVars;
26895
26871
  var _a, _b;
26896
- var _c, _d, _e, _f, _g, _h, _j, _k, _l;
26872
+ var _c, _d, _e, _f, _g, _h, _j;
26897
26873
  if (alreadyVisited === void 0) {
26898
26874
  alreadyVisited = {};
26899
26875
  }
26900
- return __generator(this, function (_m) {
26901
- switch (_m.label) {
26876
+ return __generator(this, function (_k) {
26877
+ switch (_k.label) {
26902
26878
  case 0:
26903
26879
  environmentContext = (0, getEnvironmentContext_1.getEnvironmentContext)(ctx);
26904
26880
  config = ctx.config, env = ctx.env, componentName = ctx.componentName;
@@ -26909,38 +26885,32 @@ var getEnvironmentVariables = function (ctx_1) {
26909
26885
  port = (_c = devLocalConfig.port) !== null && _c !== void 0 ? _c : 3000;
26910
26886
  host = "localhost:" + port.toString();
26911
26887
  url = "http://" + host;
26912
- predefinedVariables = __assign(__assign(__assign(__assign({}, basePredefinedVariables), {
26888
+ predefinedVariables = __assign(__assign({}, basePredefinedVariables), {
26913
26889
  ENV_SHORT: "local",
26914
- ROOT_URL: url
26915
- }), (0, types_1.isStandaloneBuildConfig)(buildConfigRaw) && buildConfigRaw.type === "rails" ? {} : {
26916
- HOST: host
26917
- }), {
26918
- HOST_INTERNAL: host,
26890
+ ROOT_URL: url,
26891
+ HOSTNAME: host,
26892
+ HOSTNAME_INTERNAL: host,
26919
26893
  ROOT_URL_INTERNAL: "http://" + host,
26920
26894
  PORT: port.toString()
26921
26895
  });
26922
26896
  } else {
26923
26897
  additionalEnvVars = deployConfigRaw ? deploy_1.DEPLOY_TYPES[deployConfigRaw.type].getAdditionalEnvVars(environmentContext) : {};
26924
- HOST_INTERNAL = (_d = additionalEnvVars.HOST_INTERNAL) !== null && _d !== void 0 ? _d : "unknown-host.example.com";
26925
- host = (_e = envConfigRaw === null || envConfigRaw === void 0 ? void 0 : envConfigRaw.host) !== null && _e !== void 0 ? _e : HOST_INTERNAL;
26898
+ HOSTNAME_INTERNAL = (_d = additionalEnvVars.HOSTNAME_INTERNAL) !== null && _d !== void 0 ? _d : "unknown-host.example.com";
26899
+ host = (_e = envConfigRaw === null || envConfigRaw === void 0 ? void 0 : envConfigRaw.host) !== null && _e !== void 0 ? _e : HOSTNAME_INTERNAL;
26926
26900
  url = (0, BashExpression_1.joinBashExpressions)(["https://", host]);
26927
26901
  predefinedVariables = __assign(__assign(__assign(__assign({}, basePredefinedVariables), (0, types_1.isStandaloneBuildConfig)(buildConfigRaw) && buildConfigRaw.type === "rails" ? {} : {
26928
- HOST: host
26902
+ HOSTNAME: host
26929
26903
  }), {
26930
26904
  ROOT_URL: url,
26931
- HOST_INTERNAL: HOST_INTERNAL,
26932
- /**@deprecated */
26933
- HOST_CANONICAL: HOST_INTERNAL,
26934
- ROOT_URL_INTERNAL: (0, BashExpression_1.joinBashExpressions)(["https://", HOST_INTERNAL])
26905
+ HOSTNAME_INTERNAL: HOSTNAME_INTERNAL,
26906
+ ROOT_URL_INTERNAL: (0, BashExpression_1.joinBashExpressions)(["https://", HOSTNAME_INTERNAL])
26935
26907
  }), additionalEnvVars);
26936
26908
  }
26937
26909
  publicEnvVarsRaw = (_g = (_f = envConfigRaw.vars) === null || _f === void 0 ? void 0 : _f.public) !== null && _g !== void 0 ? _g : {};
26938
26910
  additionalSecretKeys = deployConfigRaw ? deploy_1.DEPLOY_TYPES[deployConfigRaw.type].additionalSecretKeys(environmentContext) : [];
26939
26911
  secretEnvVarKeys = __spreadArray(__spreadArray([], __read((0, envVars_1.stringListToSecreteEnvVarList)((_j = (_h = envConfigRaw.vars) === null || _h === void 0 ? void 0 : _h.secret) !== null && _j !== void 0 ? _j : [])), false), __read(additionalSecretKeys), false);
26940
26912
  secretEnvVars = (0, envVars_1.makeSecretEnvVarMapping)(env, componentName, secretEnvVarKeys);
26941
- legacyFromComponents = (_l = (_k = envConfigRaw.vars) === null || _k === void 0 ? void 0 : _k.fromComponents) !== null && _l !== void 0 ? _l : {};
26942
- publicEnvVarsRawWithLegacyFromComponents = (0, lodash_1.merge)({}, (0, resolveReferences_1.translateLegacyFromComponents)(legacyFromComponents), publicEnvVarsRaw);
26943
- publicEnvVarsRawSanitized = (0, envVars_1.stringifyValues)(publicEnvVarsRawWithLegacyFromComponents);
26913
+ publicEnvVarsRawSanitized = (0, envVars_1.stringifyValues)(publicEnvVarsRaw);
26944
26914
  envVarsRaw = addIndexVar(__assign(__assign(__assign({}, predefinedVariables), secretEnvVars), publicEnvVarsRawSanitized));
26945
26915
  return [4 /*yield*/, (0, resolveReferences_1.resolveReferences)(envVarsRaw, function (otherComponentName, alreadyVisited) {
26946
26916
  return __awaiter(void 0, void 0, void 0, function () {
@@ -26959,7 +26929,7 @@ var getEnvironmentVariables = function (ctx_1) {
26959
26929
  });
26960
26930
  }, alreadyVisited)];
26961
26931
  case 1:
26962
- envVars = _m.sent();
26932
+ envVars = _k.sent();
26963
26933
  _a = {
26964
26934
  envVars: envVars,
26965
26935
  secretEnvVarKeys: secretEnvVarKeys
@@ -26967,10 +26937,10 @@ var getEnvironmentVariables = function (ctx_1) {
26967
26937
  _b = {};
26968
26938
  return [4 /*yield*/, (0, transformJobOnlyVars_1.transformJobOnlyVars)(env, componentName, buildConfigRaw && (0, types_1.isStandaloneBuildConfig)(buildConfigRaw) && buildConfigRaw.jobVars || null)];
26969
26939
  case 2:
26970
- _b.build = _m.sent();
26940
+ _b.build = _k.sent();
26971
26941
  return [4 /*yield*/, (0, transformJobOnlyVars_1.transformJobOnlyVars)(env, componentName, deployConfigRaw && deployConfigRaw.jobVars || null)];
26972
26942
  case 3:
26973
- return [2 /*return*/, (_a.jobOnlyVars = (_b.deploy = _m.sent(), _b), _a.host = host, _a.url = url, _a)];
26943
+ return [2 /*return*/, (_a.jobOnlyVars = (_b.deploy = _k.sent(), _b), _a.host = host, _a.url = url, _a)];
26974
26944
  }
26975
26945
  });
26976
26946
  });
@@ -27266,7 +27236,7 @@ var __importDefault = this && this.__importDefault || function (mod) {
27266
27236
  Object.defineProperty(exports, "__esModule", ({
27267
27237
  value: true
27268
27238
  }));
27269
- exports.translateLegacyFromComponents = exports.resolveReferences = void 0;
27239
+ exports.resolveReferences = void 0;
27270
27240
  var lodash_1 = __nccwpck_require__(3255);
27271
27241
  var replaceAsync_1 = __importDefault(__nccwpck_require__(1686));
27272
27242
  // regex to resolve references in catladder variables
@@ -27382,20 +27352,6 @@ var resolveReferences = function (vars_1, getOtherVariables_1) {
27382
27352
  });
27383
27353
  };
27384
27354
  exports.resolveReferences = resolveReferences;
27385
- var translateLegacyFromComponents = function (fromComponents) {
27386
- return Object.fromEntries(Object.entries(fromComponents).flatMap(function (_a) {
27387
- var _b = __read(_a, 2),
27388
- componentName = _b[0],
27389
- variables = _b[1];
27390
- return Object.entries(variables).map(function (_a) {
27391
- var _b = __read(_a, 2),
27392
- ourName = _b[0],
27393
- otherName = _b[1];
27394
- return [ourName, "${" + componentName + ":" + otherName + "}"];
27395
- });
27396
- }));
27397
- };
27398
- exports.translateLegacyFromComponents = translateLegacyFromComponents;
27399
27355
 
27400
27356
  /***/ }),
27401
27357
 
@@ -27707,7 +27663,7 @@ var stop_1 = __nccwpck_require__(7974);
27707
27663
  var variables_1 = __nccwpck_require__(7119);
27708
27664
  exports.DEPLOY_JOB_NAME = "🚀 Deploy";
27709
27665
  var createDeployJob = function (context, jobDefinition) {
27710
- var _a, _b, _c, _d, _e, _f, _g;
27666
+ var _a, _b, _c, _d, _e, _f;
27711
27667
  var hasDocker = (0, docker_1.requiresDockerBuild)(context);
27712
27668
  var isStoppable = (0, utils_1.contextIsStoppable)(context);
27713
27669
  var autoStop = context.environment.envType === "review" ? "1 week" : context.environment.envType === "dev" ? "4 weeks" : undefined;
@@ -27762,8 +27718,8 @@ var createDeployJob = function (context, jobDefinition) {
27762
27718
  when: whenDeploy === "auto" ? "on_success" : "manual",
27763
27719
  allow_failure: whenDeploy === "manual" ? true : false,
27764
27720
  stage: "deploy",
27765
- variables: __assign(__assign(__assign(__assign(__assign({}, context.environment.envVars), hasDocker ? (0, docker_1.getDockerImageVariables)(context) : {}), context.environment.jobOnlyVars.deploy.envVars), deployConfig ? (_e = deployConfig.extraVars) !== null && _e !== void 0 ? _e : {} : {}), jobDefinition.variables),
27766
- runnerVariables: __assign(__assign(__assign({}, variables_1.DEPLOY_RUNNER_VARIABLES), (_f = jobDefinition.runnerVariables) !== null && _f !== void 0 ? _f : {}), deployConfig ? (_g = deployConfig.runnerVariables) !== null && _g !== void 0 ? _g : {} : {}),
27721
+ variables: __assign(__assign(__assign(__assign({}, context.environment.envVars), hasDocker ? (0, docker_1.getDockerImageVariables)(context) : {}), context.environment.jobOnlyVars.deploy.envVars), jobDefinition.variables),
27722
+ runnerVariables: __assign(__assign(__assign({}, variables_1.DEPLOY_RUNNER_VARIABLES), (_e = jobDefinition.runnerVariables) !== null && _e !== void 0 ? _e : {}), deployConfig ? (_f = deployConfig.runnerVariables) !== null && _f !== void 0 ? _f : {} : {}),
27767
27723
  environment: isStoppable ? {
27768
27724
  on_stop: stop_1.STOP_JOB_NAME,
27769
27725
  auto_stop_in: autoStop
@@ -28993,7 +28949,7 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
28993
28949
  env = ctx.env,
28994
28950
  componentName = ctx.componentName,
28995
28951
  deployConfigRaw = ctx.deployConfigRaw;
28996
- var HOST_INTERNAL = (0, BashExpression_1.joinBashExpressions)([fullName, (0, BashExpression_1.getBashVariable)((0, context_1.getSecretVarName)(env, componentName, exports.GCLOUD_RUN_CANONICAL_HOST_SUFFIX))], "-").toLowerCase();
28952
+ var HOSTNAME_INTERNAL = (0, BashExpression_1.joinBashExpressions)([fullName, (0, BashExpression_1.getBashVariable)((0, context_1.getSecretVarName)(env, componentName, exports.GCLOUD_RUN_CANONICAL_HOST_SUFFIX))], "-").toLowerCase();
28997
28953
  var jobTriggers = deployConfigRaw && deployConfigRaw.jobs ? Object.fromEntries(Object.entries(deployConfigRaw.jobs).map(function (_a) {
28998
28954
  var _b = __read(_a, 2),
28999
28955
  name = _b[0],
@@ -29001,7 +28957,7 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
29001
28957
  return ["CLOUD_RUN_JOB_TRIGGER_URL_" + (0, gitlab_1.sanitizeForBashVariable)(name), "https://".concat(deployConfigRaw.region, "-run.googleapis.com/apis/run.googleapis.com/v1/namespaces/").concat(deployConfigRaw.projectId, "/jobs/").concat((0, jobName_1.getCloudRunJobName)(fullName, name), ":run")];
29002
28958
  })) : {};
29003
28959
  return __assign(__assign(__assign({
29004
- HOST_INTERNAL: HOST_INTERNAL
28960
+ HOSTNAME_INTERNAL: HOSTNAME_INTERNAL
29005
28961
  }, getCloudSqlVariables(ctx)), jobTriggers), {
29006
28962
  DEPLOY_CLOUD_RUN_PROJECT_ID: deployConfigRaw ? deployConfigRaw.projectId : undefined,
29007
28963
  DEPLOY_CLOUD_RUN_REGION: deployConfigRaw ? deployConfigRaw.region : undefined
@@ -29569,7 +29525,7 @@ var hasKubernetesCloudSQL = function (context) {
29569
29525
  };
29570
29526
  exports.hasKubernetesCloudSQL = hasKubernetesCloudSQL;
29571
29527
  var createKubernetesCloudsqlBaseValues = function (context) {
29572
- var _a, _b, _c, _d, _e, _f, _g;
29528
+ var _a, _b, _c;
29573
29529
  var deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
29574
29530
  if (!(0, types_1.isOfDeployType)(deployConfig, "kubernetes")) {
29575
29531
  throw new Error("cannot get cloud sql config");
@@ -29579,22 +29535,11 @@ var createKubernetesCloudsqlBaseValues = function (context) {
29579
29535
  throw new Error("cannot get cloud sql config");
29580
29536
  }
29581
29537
  var proxyCredentials = "$".concat((0, context_1.getSecretVarNameForContext)(context, "cloudsqlProxyCredentials"));
29582
- if ((config === null || config === void 0 ? void 0 : config.type) !== "unmanaged") {
29583
- var instanceConnectionName = "".concat((_c = config.projectId) !== null && _c !== void 0 ? _c : "skynet-164509", ":").concat((_d = config.region) !== null && _d !== void 0 ? _d : "europe-west6", ":").concat((_e = config.instanceId) !== null && _e !== void 0 ? _e : context.environment.envVars.KUBE_NAMESPACE);
29584
- return {
29585
- cloudsql: {
29586
- enabled: config.enabled,
29587
- dbUser: "postgres",
29588
- instanceConnectionName: instanceConnectionName,
29589
- proxyCredentials: proxyCredentials,
29590
- fullDbName: (_f = context.environment.envVars.KUBE_APP_NAME) !== null && _f !== void 0 ? _f : ""
29591
- }
29592
- };
29593
- } else if (config.type === "unmanaged") {
29538
+ if (config.type === "unmanaged") {
29594
29539
  return {
29595
29540
  cloudsql: {
29596
29541
  enabled: config.enabled,
29597
- dbUser: (_g = config.dbUser) !== null && _g !== void 0 ? _g : "postgres",
29542
+ dbUser: (_c = config.dbUser) !== null && _c !== void 0 ? _c : "postgres",
29598
29543
  instanceConnectionName: config.instanceConnectionName,
29599
29544
  proxyCredentials: proxyCredentials,
29600
29545
  fullDbName: (0, utils_1.getFullDbName)(config, context.fullConfig, context.environment.slugPrefix, context.name)
@@ -29691,9 +29636,7 @@ var createKubernetesDeployJobs = function (context) {
29691
29636
  KUBE_DOCKER_IMAGE_PULL_SECRET: "gitlab-registry-".concat(context.name),
29692
29637
  HELM_GITLAB_CHART_NAME: (_b = deployConfig.chartName) !== null && _b !== void 0 ? _b : "/helm-charts/the-panter-chart",
29693
29638
  HELM_ARGS: __spreadArray(__spreadArray([], __read(deployConfig.debug ? ["--debug"] : []), false), __read((_c = deployConfig.additionalHelmArgs) !== null && _c !== void 0 ? _c : []), false).join(" "),
29694
- COMPONENT_NAME: context.name,
29695
- /** @deprecated */
29696
- BUILD_ID: context.environment.envVars.BUILD_INFO_BUILD_ID
29639
+ COMPONENT_NAME: context.name
29697
29640
  })
29698
29641
  });
29699
29642
  var clusterName = "kube-".concat(context.environment.fullName);
@@ -29806,12 +29749,12 @@ exports.KUBERNETES_DEPLOY_TYPE = {
29806
29749
  var domainCanonical = deployConfigRaw && ((_b = deployConfigRaw.cluster) === null || _b === void 0 ? void 0 : _b.domainCanonical) ||
29807
29750
  // 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
29808
29751
  fullConfig.domainCanonical || "panter.cloud";
29809
- var HOST_INTERNAL = (0, BashExpression_1.joinBashExpressions)(__spreadArray(__spreadArray([componentSlug], __read(envType === "review" && reviewSlug ? [reviewSlug] : []), false), [env, fullConfig.appName, fullConfig.customerName, domainCanonical], false), "."); // default for kubernetes and rest
29752
+ var HOSTNAME_INTERNAL = (0, BashExpression_1.joinBashExpressions)(__spreadArray(__spreadArray([componentSlug], __read(envType === "review" && reviewSlug ? [reviewSlug] : []), false), [env, fullConfig.appName, fullConfig.customerName, domainCanonical], false), "."); // default for kubernetes and rest
29810
29753
  return {
29811
29754
  KUBE_NAMESPACE: KUBE_NAMESPACE,
29812
29755
  KUBE_APP_NAME: KUBE_APP_NAME,
29813
29756
  KUBE_APP_NAME_PREFIX: KUBE_APP_NAME_PREFIX,
29814
- HOST_INTERNAL: HOST_INTERNAL
29757
+ HOSTNAME_INTERNAL: HOSTNAME_INTERNAL
29815
29758
  };
29816
29759
  }
29817
29760
  };
@@ -29957,7 +29900,6 @@ var types_1 = __nccwpck_require__(4436);
29957
29900
  var cloudSql_1 = __nccwpck_require__(442);
29958
29901
  var kubeEnv_1 = __nccwpck_require__(5296);
29959
29902
  var mongodb_1 = __nccwpck_require__(221);
29960
- var processSecretsAsFiles_1 = __nccwpck_require__(5088);
29961
29903
  var createAppConfig = function (context, application) {
29962
29904
  if (application === false) {
29963
29905
  return {
@@ -30021,10 +29963,10 @@ var createKubeValues = function (context) {
30021
29963
  env: env,
30022
29964
  application: createAppConfig(context, application)
30023
29965
  }, (0, cloudSql_1.hasKubernetesCloudSQL)(context) ? (0, cloudSql_1.createKubernetesCloudsqlBaseValues)(context) : {}, ((_c = (_b = deployConfig.values) === null || _b === void 0 ? void 0 : _b.mongodb) === null || _c === void 0 ? void 0 : _c.enabled) ? (0, mongodb_1.createMongodbBaseConfig)(context) : {});
30024
- var kubeValues = (0, processSecretsAsFiles_1.processSecretsAsFiles)((0, utils_1.mergeWithMergingArrays)(defaultKubeValues, __assign({
29966
+ var kubeValues = (0, utils_1.mergeWithMergingArrays)(defaultKubeValues, __assign({
30025
29967
  jobs: removeFalsy(jobs),
30026
29968
  cronjobs: removeFalsy(cronjobs)
30027
- }, rest)));
29969
+ }, rest));
30028
29970
  return kubeValues;
30029
29971
  };
30030
29972
  exports.createKubeValues = createKubeValues;
@@ -30150,46 +30092,6 @@ exports.createMongodbBaseConfig = createMongodbBaseConfig;
30150
30092
 
30151
30093
  /***/ }),
30152
30094
 
30153
- /***/ 5088:
30154
- /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
30155
-
30156
- "use strict";
30157
-
30158
-
30159
- var __assign = this && this.__assign || function () {
30160
- __assign = Object.assign || function (t) {
30161
- for (var s, i = 1, n = arguments.length; i < n; i++) {
30162
- s = arguments[i];
30163
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
30164
- }
30165
- return t;
30166
- };
30167
- return __assign.apply(this, arguments);
30168
- };
30169
- Object.defineProperty(exports, "__esModule", ({
30170
- value: true
30171
- }));
30172
- exports.processSecretsAsFiles = void 0;
30173
- var lodash_1 = __nccwpck_require__(3255);
30174
- var processSecretsAsFiles = function (values) {
30175
- if (!values.secretsAsFile || values.secretsAsFile.length === 0) {
30176
- return values;
30177
- }
30178
- // the initial idea was that we "shadow" secrets that we mount as files,
30179
- // but there is a weird kubernetes issue with that (https://github.com/kubernetes/kubernetes/issues/46861),
30180
- // 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
30181
- return __assign(__assign({}, values), {
30182
- env: __assign(__assign({}, values.env), {
30183
- secret: __assign(__assign({}, (0, lodash_1.omit)(values.env.secret, values.secretsAsFile)), Object.fromEntries(values.secretsAsFile.map(function (key) {
30184
- return [key + "_content", values.env.secret[key]];
30185
- })))
30186
- })
30187
- });
30188
- };
30189
- exports.processSecretsAsFiles = processSecretsAsFiles;
30190
-
30191
- /***/ }),
30192
-
30193
30095
  /***/ 1634:
30194
30096
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
30195
30097
 
@@ -31762,7 +31664,6 @@ var makeGitlabJob = function (context, job, allJobs, baseRules) {
31762
31664
  var environment = job.environment,
31763
31665
  envMode = job.envMode,
31764
31666
  needsStages = job.needsStages,
31765
- needsOtherComponent = job.needsOtherComponent,
31766
31667
  name = job.name,
31767
31668
  needs = job.needs,
31768
31669
  jobTags = job.jobTags,
@@ -31770,7 +31671,7 @@ var makeGitlabJob = function (context, job, allJobs, baseRules) {
31770
31671
  variables = job.variables,
31771
31672
  runnerVariables = job.runnerVariables,
31772
31673
  when = job.when,
31773
- rest = __rest(job, ["environment", "envMode", "needsStages", "needsOtherComponent", "name", "needs", "jobTags", "script", "variables", "runnerVariables", "when"]);
31674
+ rest = __rest(job, ["environment", "envMode", "needsStages", "name", "needs", "jobTags", "script", "variables", "runnerVariables", "when"]);
31774
31675
  var stage = envMode === "stagePerEnv" ? "".concat(job.stage, " ").concat(context.env) : job.stage;
31775
31676
  var deduplicatedGitlabNeeds = getGitlabNeeds(context, job, allJobs);
31776
31677
  var fullJobName = getFullJobName({
@@ -31891,8 +31792,7 @@ function deduplicateNeeds(needs) {
31891
31792
  }
31892
31793
  function getGitlabNeedsForComponentJob(context, _a, allJobs) {
31893
31794
  var needsStages = _a.needsStages,
31894
- needs = _a.needs,
31895
- needsOtherComponent = _a.needsOtherComponent;
31795
+ needs = _a.needs;
31896
31796
  var needsFromStages = needsStages === null || needsStages === void 0 ? void 0 : needsStages.flatMap(function (n) {
31897
31797
  var _a, _b, _c, _d, _e, _f, _g, _h;
31898
31798
  var componentName = context.name;
@@ -31934,7 +31834,7 @@ function getGitlabNeedsForComponentJob(context, _a, allJobs) {
31934
31834
  });
31935
31835
  }
31936
31836
  });
31937
- var cleanedNeeds = __spreadArray(__spreadArray(__spreadArray([], __read(needsFromStages !== null && needsFromStages !== void 0 ? needsFromStages : []), false), __read(needs !== null && needs !== void 0 ? needs : []), false), __read(needsOtherComponent !== null && needsOtherComponent !== void 0 ? needsOtherComponent : []), false);
31837
+ var cleanedNeeds = __spreadArray(__spreadArray([], __read(needsFromStages !== null && needsFromStages !== void 0 ? needsFromStages : []), false), __read(needs !== null && needs !== void 0 ? needs : []), false);
31938
31838
  return cleanedNeeds === null || cleanedNeeds === void 0 ? void 0 : cleanedNeeds.map(function (n) {
31939
31839
  var _a;
31940
31840
  return (0, lodash_1.isObject)(n) ? "workspaceName" in n ? {
package/dist/constants.js CHANGED
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
7
- exports.PIPELINE_IMAGE_TAG = "next-e2e4f00a" || "latest";
7
+ exports.PIPELINE_IMAGE_TAG = "next-c0c5f6da" || "latest";
8
8
  exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || "git.panter.ch:5001/catladder/catladder";
@@ -343,26 +343,4 @@ describe("resolveReferences", function () {
343
343
  });
344
344
  });
345
345
  });
346
- });
347
-
348
- describe("translateLegacyFromComponents", function () {
349
- it("translatetes the old `fromComponents` approach to ${componentName:variableName}", function () {
350
- var fromComponents = {
351
- api: {
352
- API_FOO: "FOO",
353
- API_BAR: "BAR"
354
- },
355
- www: {
356
- WWW_X: "X",
357
- WWW_Y: "Y"
358
- }
359
- };
360
- var result = (0, resolveReferences_1.translateLegacyFromComponents)(fromComponents);
361
- expect(result).toEqual({
362
- API_FOO: "${api:FOO}",
363
- API_BAR: "${api:BAR}",
364
- WWW_X: "${www:X}",
365
- WWW_Y: "${www:Y}"
366
- });
367
- });
368
346
  });