@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
@@ -63,7 +63,7 @@ var constants_1 = require("./constants");
63
63
  var writeBuildInfo_1 = require("./writeBuildInfo");
64
64
  var writeDotEnv_1 = require("./writeDotEnv");
65
65
  var createAppBuildJob = function (context, _a) {
66
- var _b, _c;
66
+ var _b;
67
67
  var script = _a.script,
68
68
  variables = _a.variables,
69
69
  runnerVariables = _a.runnerVariables,
@@ -76,8 +76,8 @@ var createAppBuildJob = function (context, _a) {
76
76
  image: (0, __1.getRunnerImage)("jobs-default"),
77
77
  needs: [],
78
78
  cache: cache ? (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, cache) : undefined,
79
- 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 : {}) : {}),
80
- 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 : {}),
79
+ variables: __assign(__assign({}, variables !== null && variables !== void 0 ? variables : {}), context.type === "component" ? __assign(__assign({}, context.environment.envVars), context.environment.jobOnlyVars.build.envVars) : {}),
80
+ 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 : {}),
81
81
  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) {
82
82
  return (0, writeDotEnv_1.componentContextNeedsBuildTimeDotEnv)(c);
83
83
  }).flatMap(function (c) {
@@ -55,7 +55,7 @@ var RUNNER_CUSTOM_TEST_VARIABLES = {
55
55
  KUBERNETES_MEMORY_LIMIT: "4Gi"
56
56
  };
57
57
  var createCustomTestJobs = function (context) {
58
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
58
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
59
59
  // don't run tests after release
60
60
  // TODO: this will be replaced by using rules
61
61
  if (context.trigger === "taggedRelease") {
@@ -66,9 +66,9 @@ var createCustomTestJobs = function (context) {
66
66
  throw new Error("deploy config is not custom");
67
67
  }
68
68
  var base = {
69
- variables: __assign(__assign({
69
+ variables: __assign({
70
70
  APP_PATH: context.build.dir
71
- }, context.environment.jobOnlyVars.build.envVars), (_a = buildConfig.extraVars) !== null && _a !== void 0 ? _a : {}),
71
+ }, context.environment.jobOnlyVars.build.envVars),
72
72
  runnerVariables: RUNNER_CUSTOM_TEST_VARIABLES,
73
73
  services: buildConfig.jobServices,
74
74
  cache: (0, createJobCache_1.createJobCacheFromConfig)(context, buildConfig),
@@ -79,23 +79,23 @@ var createCustomTestJobs = function (context) {
79
79
  var auditJob = buildConfig.audit ? __assign(__assign(__assign({
80
80
  name: "🛡 audit"
81
81
  }, base), {
82
- image: (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : buildConfig.jobImage,
82
+ image: (_b = (_a = buildConfig.audit) === null || _a === void 0 ? void 0 : _a.jobImage) !== null && _b !== void 0 ? _b : buildConfig.jobImage,
83
83
  cache: undefined,
84
- script: __spreadArray([], __read((0, utils_1.ensureArray)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)), false),
84
+ script: __spreadArray([], __read((0, utils_1.ensureArray)((_c = buildConfig.audit) === null || _c === void 0 ? void 0 : _c.command)), false),
85
85
  allow_failure: true
86
- }), (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;
86
+ }), (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;
87
87
  var lintJob = buildConfig.lint ? __assign(__assign(__assign({
88
88
  name: "👮 lint"
89
89
  }, base), {
90
- image: (_h = (_g = buildConfig.lint) === null || _g === void 0 ? void 0 : _g.jobImage) !== null && _h !== void 0 ? _h : buildConfig.jobImage,
91
- script: __spreadArray([], __read((0, utils_1.ensureArray)((_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.command)), false)
92
- }), (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;
90
+ image: (_g = (_f = buildConfig.lint) === null || _f === void 0 ? void 0 : _f.jobImage) !== null && _g !== void 0 ? _g : buildConfig.jobImage,
91
+ script: __spreadArray([], __read((0, utils_1.ensureArray)((_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.command)), false)
92
+ }), (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;
93
93
  var testJob = buildConfig.test ? __assign(__assign(__assign({
94
94
  name: "🧪 test"
95
95
  }, base), {
96
- image: (_o = (_m = buildConfig.test) === null || _m === void 0 ? void 0 : _m.jobImage) !== null && _o !== void 0 ? _o : buildConfig.jobImage,
97
- script: __spreadArray([], __read((0, utils_1.ensureArray)((_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.command)), false)
98
- }), (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;
96
+ image: (_m = (_l = buildConfig.test) === null || _l === void 0 ? void 0 : _l.jobImage) !== null && _m !== void 0 ? _m : buildConfig.jobImage,
97
+ script: __spreadArray([], __read((0, utils_1.ensureArray)((_o = buildConfig.test) === null || _o === void 0 ? void 0 : _o.command)), false)
98
+ }), (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;
99
99
  return [auditJob, lintJob, testJob].filter(utils_1.notNil);
100
100
  };
101
101
  exports.createCustomTestJobs = createCustomTestJobs;
@@ -58,7 +58,7 @@ var createNodeBuildJobDefinition = function (context) {
58
58
  var yarnInstall = (0, yarn_1.getYarnInstall)(context);
59
59
  return (0, createBuildJobDefinition_1.createBuildJobDefinition)(context, buildConfig, {
60
60
  prescript: yarnInstall,
61
- cache: __spreadArray(__spreadArray([], __read((0, cache_1.getNodeCache)(context)), false), __read((0, cache_1.getNextCache)(context)), false)
61
+ cache: (0, cache_1.getNodeCache)(context)
62
62
  });
63
63
  };
64
64
  exports.createNodeBuildJobDefinition = createNodeBuildJobDefinition;
@@ -1,7 +1,5 @@
1
- import type { Context, WorkspaceContext } from "../../types/context";
1
+ import type { Context } from "../../types/context";
2
2
  import type { CacheConfig } from "../types";
3
3
  export declare const getYarnCache: (context: Context, policy?: string) => CacheConfig[];
4
4
  export declare const getNodeModulesCache: (context: Context, policy?: string) => CacheConfig[];
5
- export declare const getNodeCache: (context: Context, policy?: string) => CacheConfig[];
6
- export declare const getNextCache: (context: Context) => CacheConfig[];
7
- export declare const getWorkspaceDefaultCaches: (context: WorkspaceContext) => CacheConfig[];
5
+ export declare const getNodeCache: (context: Context, policy?: string) => CacheConfig[];
@@ -39,7 +39,7 @@ var __importDefault = this && this.__importDefault || function (mod) {
39
39
  Object.defineProperty(exports, "__esModule", {
40
40
  value: true
41
41
  });
42
- exports.getWorkspaceDefaultCaches = exports.getNextCache = exports.getNodeCache = exports.getNodeModulesCache = exports.getYarnCache = void 0;
42
+ exports.getNodeCache = exports.getNodeModulesCache = exports.getYarnCache = void 0;
43
43
  var lodash_1 = require("lodash");
44
44
  var path_1 = require("path");
45
45
  var slugify_1 = __importDefault(require("slugify"));
@@ -82,27 +82,6 @@ var getNodeCache = function (context, policy) {
82
82
  if (policy === void 0) {
83
83
  policy = "pull-push";
84
84
  }
85
- 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);
85
+ return __spreadArray(__spreadArray([], __read((0, exports.getYarnCache)(context, policy)), false), __read((0, exports.getNodeModulesCache)(context, policy)), false);
86
86
  };
87
- exports.getNodeCache = getNodeCache;
88
- var getNextCache = function (context) {
89
- var paths = context.build.getComponentDirs("direct").map(function (c) {
90
- return (0, path_1.join)(c, ".next/cache");
91
- });
92
- return [{
93
- pathMode: "absolute",
94
- key: "next-cache",
95
- policy: "pull-push",
96
- paths: paths
97
- }];
98
- };
99
- exports.getNextCache = getNextCache;
100
- var getWorkspaceDefaultCaches = function (context) {
101
- return [{
102
- // turbo repo
103
- key: "turbo",
104
- policy: "pull-push",
105
- paths: [".turbo"]
106
- }];
107
- };
108
- exports.getWorkspaceDefaultCaches = getWorkspaceDefaultCaches;
87
+ exports.getNodeCache = getNodeCache;
@@ -54,7 +54,7 @@ var constants_1 = require("./constants");
54
54
  var yarn_1 = require("./yarn");
55
55
  var createJobCache_1 = require("../cache/createJobCache");
56
56
  var createNodeTestJobs = function (context) {
57
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
57
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
58
58
  // don't run tests after release
59
59
  // TODO: this will be replaced by using rules
60
60
  if (context.trigger === "taggedRelease") {
@@ -68,7 +68,7 @@ var createNodeTestJobs = function (context) {
68
68
  var base = {
69
69
  variables: __assign({
70
70
  APP_PATH: context.build.dir
71
- }, context.type === "component" ? __assign(__assign({}, context.environment.jobOnlyVars.build.envVars), (_a = context.build.config.extraVars) !== null && _a !== void 0 ? _a : {}) : {}),
71
+ }, context.type === "component" ? __assign({}, context.environment.jobOnlyVars.build.envVars) : {}),
72
72
  runnerVariables: constants_1.NODE_RUNNER_BUILD_VARIABLES,
73
73
  stage: "test",
74
74
  needs: [],
@@ -79,26 +79,26 @@ var createNodeTestJobs = function (context) {
79
79
  var auditJob = buildConfig.audit !== false ? __assign(__assign(__assign({
80
80
  name: "🛡 audit"
81
81
  }, base), {
82
- image: (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : defaultImage,
82
+ image: (_b = (_a = buildConfig.audit) === null || _a === void 0 ? void 0 : _a.jobImage) !== null && _b !== void 0 ? _b : defaultImage,
83
83
  cache: undefined,
84
- 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
84
+ 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
85
85
  ]), false),
86
86
  allow_failure: true
87
- }), (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;
87
+ }), (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;
88
88
  var lintJob = buildConfig.lint !== false ? __assign(__assign(__assign({
89
89
  name: "👮 lint"
90
90
  }, base), {
91
- image: (_j = (_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.jobImage) !== null && _j !== void 0 ? _j : defaultImage,
91
+ image: (_h = (_g = buildConfig.lint) === null || _g === void 0 ? void 0 : _g.jobImage) !== null && _h !== void 0 ? _h : defaultImage,
92
92
  cache: (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, (0, cache_1.getNodeCache)(context)),
93
- 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)
94
- }), (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;
93
+ 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)
94
+ }), (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;
95
95
  var testJob = buildConfig.test !== false ? __assign(__assign(__assign({
96
96
  name: "🧪 test"
97
97
  }, base), {
98
- 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"),
98
+ 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"),
99
99
  cache: (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, (0, cache_1.getNodeCache)(context)),
100
- 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)
101
- }), (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;
100
+ 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)
101
+ }), (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;
102
102
  return [auditJob, lintJob, testJob].filter(utils_1.notNil);
103
103
  };
104
104
  exports.createNodeTestJobs = createNodeTestJobs;
@@ -79,7 +79,7 @@ var createRailsBuildJobs = function (context) {
79
79
  return (0, base_1.createComponentBuildJobs)(context, {
80
80
  appBuild: undefined,
81
81
  dockerBuild: {
82
- variables: __assign(__assign({}, context.environment.jobOnlyVars.build.envVars), context.build.config.extraVars),
82
+ variables: __assign({}, context.environment.jobOnlyVars.build.envVars),
83
83
  // custom script
84
84
  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",
85
85
  // replace private git ssh gem sources with https to make bundler with credentials via env var work
@@ -48,7 +48,7 @@ exports.createRailsTestJobs = void 0;
48
48
  var __1 = require("../..");
49
49
  var utils_1 = require("../../utils");
50
50
  var createRailsTestJobs = function (context) {
51
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
51
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
52
52
  // don't run tests after release
53
53
  // TODO: this will be replaced by using rules
54
54
  if (context.trigger === "taggedRelease") {
@@ -60,7 +60,7 @@ var createRailsTestJobs = function (context) {
60
60
  }
61
61
  var buildConfig = context.build.config;
62
62
  var base = {
63
- variables: __assign(__assign({}, context.environment.jobOnlyVars.build.envVars), (_a = buildConfig.extraVars) !== null && _a !== void 0 ? _a : {}),
63
+ variables: __assign({}, context.environment.jobOnlyVars.build.envVars),
64
64
  stage: "test",
65
65
  needs: [],
66
66
  envMode: "none"
@@ -80,23 +80,23 @@ var createRailsTestJobs = function (context) {
80
80
  name: "🛡 audit"
81
81
  }, base), {
82
82
  cache: undefined,
83
- 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,
84
- 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),
83
+ 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,
84
+ 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),
85
85
  allow_failure: true
86
86
  }) : null;
87
87
  var lintJob = buildConfig.lint !== false ? __assign(__assign({
88
88
  name: "👮 lint"
89
89
  }, base), {
90
90
  cache: bundlerCache,
91
- 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,
92
- 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)
91
+ 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,
92
+ 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)
93
93
  }) : null;
94
94
  var testJob = buildConfig.test !== false ? __assign(__assign({
95
95
  name: "🧪 test"
96
96
  }, base), {
97
97
  cache: bundlerCache,
98
- 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,
99
- 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)
98
+ 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,
99
+ 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)
100
100
  }) : null;
101
101
  return [auditJob, lintJob, testJob].filter(utils_1.notNil);
102
102
  };
@@ -67,12 +67,6 @@ export type BuildConfigBase = {
67
67
  * Can curently not reference other variables from other components
68
68
  */
69
69
  jobVars?: EnvVars;
70
- /**
71
- * additional env vars for the buid jobs
72
- *
73
- * @deprecated use jobVars or runnerVariables
74
- */
75
- extraVars?: Record<string, string>;
76
70
  /**
77
71
  * additional vars only for the runner.
78
72
  * Also if you use services: that require env vars, you need to set them here.
@@ -187,10 +181,6 @@ type BuildConfigDockerCustom = {
187
181
  buildContextLocation?: "root" | "component";
188
182
  };
189
183
  export type BuildConfigDocker = BuildConfigDockerBuiltIn | BuildConfigDockerCustom;
190
- /**
191
- * @deprecated this type is no longer used. Use {@link BuildConfigDocker} instead.
192
- */
193
- export type BuildConfigCustomDocker = BuildConfigDockerCustom | BuildConfigDockerBuiltInNgninx;
194
184
  export type BuildConfigCustom = Omit<BuildConfigBase, "lint" | "test" | "audit"> & {
195
185
  type: "custom";
196
186
  jobImage: GitlabJobImage;