@catladder/pipeline 1.146.0 โ†’ 1.146.2

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 (124) hide show
  1. package/dist/build/base/createAppBuildJob.d.ts +2 -2
  2. package/dist/build/base/createAppBuildJob.js +1 -1
  3. package/dist/build/base/index.d.ts +2 -2
  4. package/dist/build/base/writeBuildInfo.d.ts +2 -2
  5. package/dist/build/base/writeDotEnv.d.ts +2 -2
  6. package/dist/build/custom/buildJob.d.ts +2 -2
  7. package/dist/build/custom/index.d.ts +2 -2
  8. package/dist/build/custom/testJob.d.ts +2 -2
  9. package/dist/build/docker.d.ts +9 -9
  10. package/dist/build/index.d.ts +2 -2
  11. package/dist/build/node/buildJob.d.ts +2 -2
  12. package/dist/build/node/buildJob.js +6 -6
  13. package/dist/build/node/cache.d.ts +5 -5
  14. package/dist/build/node/cache.js +4 -4
  15. package/dist/build/node/index.d.ts +4 -4
  16. package/dist/build/node/meteor.d.ts +2 -2
  17. package/dist/build/node/meteor.js +2 -2
  18. package/dist/build/node/testJob.d.ts +2 -2
  19. package/dist/build/node/testJob.js +6 -6
  20. package/dist/build/node/yarn.d.ts +4 -4
  21. package/dist/build/node/yarn.js +1 -1
  22. package/dist/build/rails/build.d.ts +2 -2
  23. package/dist/build/rails/index.d.ts +2 -2
  24. package/dist/build/rails/test.d.ts +2 -2
  25. package/dist/build/sbom.d.ts +2 -2
  26. package/dist/build/sbom.js +1 -1
  27. package/dist/bundles/catladder-gitlab/index.js +1 -1
  28. package/dist/constants.js +1 -1
  29. package/dist/context/getEnvironment.d.ts +2 -2
  30. package/dist/context/getEnvironmentContext.d.ts +2 -2
  31. package/dist/context/getEnvironmentVariables.d.ts +4 -4
  32. package/dist/context/getLabels.d.ts +2 -2
  33. package/dist/context/index.d.ts +7 -3
  34. package/dist/context/index.js +12 -3
  35. package/dist/deploy/base/deploy.d.ts +2 -2
  36. package/dist/deploy/base/index.d.ts +2 -2
  37. package/dist/deploy/base/rollback.d.ts +2 -2
  38. package/dist/deploy/base/stop.d.ts +2 -2
  39. package/dist/deploy/cloudRun/artifactsRegistry.d.ts +7 -7
  40. package/dist/deploy/cloudRun/cleanup.d.ts +2 -2
  41. package/dist/deploy/cloudRun/cloudRunRevisions.d.ts +2 -2
  42. package/dist/deploy/cloudRun/createJobs/cloudRunJobs.d.ts +6 -6
  43. package/dist/deploy/cloudRun/createJobs/cloudRunServices.d.ts +3 -3
  44. package/dist/deploy/cloudRun/createJobs/common.d.ts +4 -4
  45. package/dist/deploy/cloudRun/createJobs/getCloudRunDeployScripts.d.ts +2 -2
  46. package/dist/deploy/cloudRun/createJobs/getCloudRunStopScripts.d.ts +2 -2
  47. package/dist/deploy/cloudRun/createJobs/index.d.ts +2 -2
  48. package/dist/deploy/cloudRun/utils/database.d.ts +3 -3
  49. package/dist/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.d.ts +2 -2
  50. package/dist/deploy/cloudRun/utils/getServiceName.d.ts +2 -2
  51. package/dist/deploy/custom/deployJob.d.ts +2 -2
  52. package/dist/deploy/custom/deployJob.js +1 -1
  53. package/dist/deploy/dockerTag/deployJob.d.ts +2 -2
  54. package/dist/deploy/index.d.ts +2 -2
  55. package/dist/deploy/kubernetes/cloudSql/index.d.ts +3 -3
  56. package/dist/deploy/kubernetes/deployJob.d.ts +2 -2
  57. package/dist/deploy/kubernetes/kubeEnv.d.ts +2 -2
  58. package/dist/deploy/kubernetes/kubeValues.d.ts +2 -2
  59. package/dist/deploy/kubernetes/mongodb.d.ts +2 -2
  60. package/dist/deploy/sbom.d.ts +4 -4
  61. package/dist/deploy/utils.d.ts +2 -2
  62. package/dist/pipeline/createJobsForComponent.d.ts +2 -2
  63. package/dist/pipeline/createJobsForComponent.js +1 -1
  64. package/dist/pipeline/generatePipelineFiles.js +15 -5
  65. package/dist/tsconfig.tsbuildinfo +1 -1
  66. package/dist/types/config.d.ts +2 -2
  67. package/dist/types/context.d.ts +16 -2
  68. package/package.json +1 -1
  69. package/src/build/base/createAppBuildJob.ts +3 -3
  70. package/src/build/base/index.ts +2 -2
  71. package/src/build/base/writeBuildInfo.ts +2 -2
  72. package/src/build/base/writeDotEnv.ts +2 -2
  73. package/src/build/custom/__tests__/testJob.test.ts +5 -5
  74. package/src/build/custom/buildJob.ts +4 -2
  75. package/src/build/custom/index.ts +2 -2
  76. package/src/build/custom/testJob.ts +4 -2
  77. package/src/build/docker.ts +9 -9
  78. package/src/build/index.ts +2 -2
  79. package/src/build/node/buildJob.ts +13 -9
  80. package/src/build/node/cache.ts +9 -9
  81. package/src/build/node/index.ts +6 -4
  82. package/src/build/node/meteor.ts +10 -5
  83. package/src/build/node/testJob.ts +11 -8
  84. package/src/build/node/yarn.ts +6 -8
  85. package/src/build/rails/build.ts +4 -2
  86. package/src/build/rails/index.ts +2 -2
  87. package/src/build/rails/test.ts +4 -2
  88. package/src/build/sbom.ts +4 -4
  89. package/src/context/getEnvironment.ts +2 -2
  90. package/src/context/getEnvironmentContext.ts +2 -2
  91. package/src/context/getEnvironmentVariables.ts +7 -4
  92. package/src/context/getLabels.ts +2 -2
  93. package/src/context/index.ts +15 -5
  94. package/src/deploy/base/deploy.ts +2 -2
  95. package/src/deploy/base/index.ts +2 -2
  96. package/src/deploy/base/rollback.ts +2 -2
  97. package/src/deploy/base/stop.ts +2 -2
  98. package/src/deploy/cloudRun/artifactsRegistry.ts +12 -7
  99. package/src/deploy/cloudRun/cleanup.ts +2 -2
  100. package/src/deploy/cloudRun/cloudRunRevisions.ts +3 -3
  101. package/src/deploy/cloudRun/createJobs/cloudRunJobs.ts +10 -10
  102. package/src/deploy/cloudRun/createJobs/cloudRunServices.ts +3 -3
  103. package/src/deploy/cloudRun/createJobs/common.ts +4 -4
  104. package/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.ts +5 -2
  105. package/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.ts +2 -2
  106. package/src/deploy/cloudRun/createJobs/index.ts +2 -2
  107. package/src/deploy/cloudRun/utils/database.ts +3 -3
  108. package/src/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.ts +4 -2
  109. package/src/deploy/cloudRun/utils/getServiceName.ts +2 -2
  110. package/src/deploy/custom/deployJob.ts +7 -3
  111. package/src/deploy/dockerTag/deployJob.ts +4 -2
  112. package/src/deploy/index.ts +2 -2
  113. package/src/deploy/kubernetes/cloudSql/index.ts +3 -3
  114. package/src/deploy/kubernetes/deployJob.ts +2 -2
  115. package/src/deploy/kubernetes/kubeEnv.ts +2 -2
  116. package/src/deploy/kubernetes/kubeValues.ts +3 -3
  117. package/src/deploy/kubernetes/mongodb.ts +8 -8
  118. package/src/deploy/sbom.ts +8 -4
  119. package/src/deploy/utils.ts +2 -2
  120. package/src/pipeline/createJobsForComponent.ts +11 -7
  121. package/src/pipeline/generatePipelineFiles.ts +20 -11
  122. package/src/pipeline/gitlab/createGitlabJobs.ts +2 -2
  123. package/src/types/config.ts +2 -2
  124. package/src/types/context.ts +18 -2
@@ -1,7 +1,7 @@
1
- import type { Context } from "../..";
1
+ import type { ComponentContext } from "../..";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
3
  export type AppBuildJobDefinition = Partial<CatladderJob>;
4
- export declare const createAppBuildJob: (context: Context, {
4
+ export declare const createAppBuildJob: (context: ComponentContext, {
5
5
  script,
6
6
  variables,
7
7
  runnerVariables,
@@ -77,7 +77,7 @@ var createAppBuildJob = function (context, _a) {
77
77
  variables: __assign(__assign(__assign(__assign({}, variables !== null && variables !== void 0 ? variables : {}), context.environment.envVars), context.environment.jobOnlyVars.build.envVars), (_b = context.componentConfig.build.extraVars) !== null && _b !== void 0 ? _b : {}),
78
78
  runnerVariables: __assign(__assign(__assign({}, constants_1.RUNNER_BUILD_RESOURCE_VARIABLES), runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {}), (_c = context.componentConfig.build.runnerVariables) !== null && _c !== void 0 ? _c : {}),
79
79
  script: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(context.componentConfig.dotEnv === true // don't build when set to `local`
80
- ? (0, writeDotEnv_1.writeDotEnv)(context) : []), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context)), false), ["cd ".concat(context.componentConfig.dir)], false), __read((_d = (0, utils_1.ensureArray)(script)) !== null && _d !== void 0 ? _d : []), false),
80
+ ? (0, writeDotEnv_1.writeDotEnv)(context) : []), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context.buildContext)), false), ["cd ".concat(context.componentConfig.dir)], false), __read((_d = (0, utils_1.ensureArray)(script)) !== null && _d !== void 0 ? _d : []), false),
81
81
  artifacts: {
82
82
  paths: [(0, path_1.join)(context.componentConfig.dir, "__build_info.json")],
83
83
  reports: {
@@ -1,8 +1,8 @@
1
- import type { Context } from "../../types/context";
1
+ import type { ComponentContext } from "../../types/context";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
3
  import type { DockerBuildJobDefinition } from "../docker";
4
4
  import type { AppBuildJobDefinition } from "./createAppBuildJob";
5
- export declare const createBuildJobs: (context: Context, definitions: {
5
+ export declare const createBuildJobs: (context: ComponentContext, definitions: {
6
6
  appBuild?: AppBuildJobDefinition;
7
7
  dockerBuild: DockerBuildJobDefinition;
8
8
  }) => CatladderJob[];
@@ -1,2 +1,2 @@
1
- import type { Context } from "../../types";
2
- export declare const writeBuildInfo: (context: Context) => string[];
1
+ import type { ComponentContext } from "../../types";
2
+ export declare const writeBuildInfo: (context: ComponentContext) => string[];
@@ -1,7 +1,7 @@
1
- import type { Context } from "../../types";
1
+ import type { ComponentContext } from "../../types";
2
2
  /**
3
3
  * writes a .env file in the components folder
4
4
  * @param context
5
5
  * @returns
6
6
  */
7
- export declare const writeDotEnv: (context: Context) => string[];
7
+ export declare const writeDotEnv: (context: ComponentContext) => string[];
@@ -1,3 +1,3 @@
1
- import type { Context } from "../../types/context";
1
+ import type { ComponentContext } from "../../types/context";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
- export declare const createCustomBuildJobs: (context: Context) => CatladderJob[];
3
+ export declare const createCustomBuildJobs: (context: ComponentContext) => CatladderJob[];
@@ -1,3 +1,3 @@
1
- import type { Context } from "../../types/context";
1
+ import type { ComponentContext } from "../../types/context";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
- export declare const createCustomJobs: (context: Context) => CatladderJob[];
3
+ export declare const createCustomJobs: (context: ComponentContext) => CatladderJob[];
@@ -1,7 +1,7 @@
1
- import type { Context } from "../../types/context";
1
+ import type { ComponentContext } from "../../types/context";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
3
  import type { Artifacts } from "../../types";
4
- export declare const createCustomTestJobs: (context: Context) => CatladderJob[];
4
+ export declare const createCustomTestJobs: (context: ComponentContext) => CatladderJob[];
5
5
  export type OptionalArtifacts = {
6
6
  artifacts: Artifacts;
7
7
  } | undefined;
@@ -1,6 +1,6 @@
1
- import type { Context } from "../types";
1
+ import type { ComponentContext } from "../types";
2
2
  import type { CatladderJob } from "../types/jobs";
3
- export declare const getDockerImageVariables: (context: Context) => {
3
+ export declare const getDockerImageVariables: (context: ComponentContext) => {
4
4
  DOCKER_IMAGE_TAG: string;
5
5
  DOCKER_REGISTRY: string;
6
6
  DOCKER_IMAGE: import("../bash/BashExpression").StringOrBashExpression;
@@ -19,8 +19,8 @@ export declare const requiresDockerBuild: ({
19
19
  componentConfig: {
20
20
  deploy
21
21
  }
22
- }: Context) => boolean;
23
- export declare const getDockerBuildVariables: (context: Context) => {
22
+ }: ComponentContext) => boolean;
23
+ export declare const getDockerBuildVariables: (context: ComponentContext) => {
24
24
  DOCKER_IMAGE_TAG: string;
25
25
  DOCKER_REGISTRY: string;
26
26
  DOCKER_IMAGE: import("../bash/BashExpression").StringOrBashExpression;
@@ -41,12 +41,12 @@ export declare const getDockerBuildVariables: (context: Context) => {
41
41
  DOCKER_DIR: string;
42
42
  };
43
43
  export declare const DOCKER_BUILD_JOB_NAME = "\uD83D\uDD28 docker";
44
- export declare const getDockerJobBaseProps: (context: Context) => Pick<CatladderJob, "image" | "services" | "variables" | "runnerVariables">;
44
+ export declare const getDockerJobBaseProps: (context: ComponentContext) => Pick<CatladderJob, "image" | "services" | "variables" | "runnerVariables">;
45
45
  export type DockerBuildJobDefinition = Partial<CatladderJob>;
46
- export declare const createDockerBuildJobBase: (context: Context, {
46
+ export declare const createDockerBuildJobBase: (context: ComponentContext, {
47
47
  script,
48
48
  ...def
49
49
  }: Partial<CatladderJob>) => CatladderJob;
50
- export declare const gitlabDockerLogin: (context: Context) => string[];
51
- export declare const getDockerBuildDefaultScript: (context: Context, ensureDockerFileScript?: string) => (string | undefined)[];
52
- export declare const hasDockerfile: (context: Context) => boolean;
50
+ export declare const gitlabDockerLogin: (context: ComponentContext) => string[];
51
+ export declare const getDockerBuildDefaultScript: (context: ComponentContext, ensureDockerFileScript?: string) => (string | undefined)[];
52
+ export declare const hasDockerfile: (context: ComponentContext) => boolean;
@@ -1,11 +1,11 @@
1
- import type { Context } from "../types/context";
1
+ import type { ComponentContext } from "../types/context";
2
2
  import type { EnvironmentContext } from "../types/environmentContext";
3
3
  import type { CatladderJob } from "../types/jobs";
4
4
  import type { BuildConfig, BuildConfigType } from "./types";
5
5
  export * from "./types";
6
6
  export * from "./node";
7
7
  export type BuildTypes = { [type in BuildConfigType]: {
8
- jobs: (context: Context) => CatladderJob[];
8
+ jobs: (context: ComponentContext) => CatladderJob[];
9
9
  defaults: (envContext: EnvironmentContext<BuildConfigType, any>) => Partial<Extract<BuildConfig, {
10
10
  type: type;
11
11
  }>>;
@@ -1,3 +1,3 @@
1
- import type { Context } from "../../types/context";
1
+ import type { ComponentContext } from "../../types/context";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
- export declare const createNodeBuildJobs: (context: Context) => CatladderJob[];
3
+ export declare const createNodeBuildJobs: (context: ComponentContext) => CatladderJob[];
@@ -51,15 +51,15 @@ var createNodeBuildJobs = function (context) {
51
51
  throw new Error("deploy config is not node, node-static or storybook");
52
52
  }
53
53
  var defaultImage = (0, runner_1.getRunnerImage)("jobs-default");
54
- var yarnInstall = (0, yarn_1.getYarnInstall)(context);
54
+ var yarnInstall = (0, yarn_1.getYarnInstall)(context.buildContext);
55
55
  return (0, base_1.createBuildJobs)(context, {
56
56
  appBuild: buildConfig.buildCommand !== null ? {
57
57
  image: (_a = buildConfig.jobImage) !== null && _a !== void 0 ? _a : defaultImage,
58
58
  runnerVariables: constants_1.NODE_RUNNER_BUILD_VARIABLES,
59
- cache: __spreadArray(__spreadArray(__spreadArray([], __read((_b = (0, utils_1.ensureArray)(buildConfig.jobCache)) !== null && _b !== void 0 ? _b : []), false), __read((0, cache_1.getNodeCache)(context)), false), __read((0, cache_1.getNextCache)(context)), false),
59
+ cache: __spreadArray(__spreadArray(__spreadArray([], __read((_b = (0, utils_1.ensureArray)(buildConfig.jobCache)) !== null && _b !== void 0 ? _b : []), false), __read((0, cache_1.getNodeCache)(context.buildContext)), false), __read((0, cache_1.getNextCache)(context)), false),
60
60
  script: __spreadArray(__spreadArray([], __read(yarnInstall), false), __read((_c = (0, utils_1.ensureArray)(buildConfig.buildCommand)) !== null && _c !== void 0 ? _c : []), false),
61
61
  artifacts: {
62
- paths: __spreadArray([context.componentConfig.dir], __read((_e = (_d = context.packageManagerInfo) === null || _d === void 0 ? void 0 : _d.currentWorkspaceDependencies) !== null && _e !== void 0 ? _e : []), false).flatMap(function (dir) {
62
+ paths: __spreadArray([context.componentConfig.dir], __read((_e = (_d = context.buildContext.packageManagerInfo) === null || _d === void 0 ? void 0 : _d.currentWorkspaceDependencies) !== null && _e !== void 0 ? _e : []), false).flatMap(function (dir) {
63
63
  var _a, _b;
64
64
  return __spreadArray([(0, path_1.join)(dir, "__build_info.json"), (0, path_1.join)(dir, "dist"), (0, path_1.join)(dir, ".next")], __read((_b = (_a = buildConfig.artifactsPaths) === null || _a === void 0 ? void 0 : _a.map(function (path) {
65
65
  return (0, path_1.join)(dir, path);
@@ -72,11 +72,11 @@ var createNodeBuildJobs = function (context) {
72
72
  } : undefined,
73
73
  dockerBuild: {
74
74
  script: (0, docker_1.getDockerBuildDefaultScript)(context, buildConfig.type === "node-static" || buildConfig.type === "storybook" ? "ensureNginxDockerfile" : "ensureNodeDockerfile"),
75
- cache: __spreadArray([], __read((0, cache_1.getYarnCache)(context, "pull")), false),
75
+ cache: __spreadArray([], __read((0, cache_1.getYarnCache)(context.buildContext, "pull")), false),
76
76
  variables: {
77
77
  // only required for non static
78
- DOCKER_COPY_AND_INSTALL_APP: (0, yarn_1.getDockerAppCopyAndBuildScript)(context),
79
- DOCKER_COPY_WORKSPACE_FILES: (_g = (_f = context.packageManagerInfo) === null || _f === void 0 ? void 0 : _f.pathsToCopyInDocker.map(function (dir) {
78
+ DOCKER_COPY_AND_INSTALL_APP: (0, yarn_1.getDockerAppCopyAndBuildScript)(context.buildContext),
79
+ DOCKER_COPY_WORKSPACE_FILES: (_g = (_f = context.buildContext.packageManagerInfo) === null || _f === void 0 ? void 0 : _f.pathsToCopyInDocker.map(function (dir) {
80
80
  return "COPY --chown=node:node ".concat(dir, " /app/").concat(dir);
81
81
  })) === null || _g === void 0 ? void 0 : _g.join("\n")
82
82
  }
@@ -1,6 +1,6 @@
1
- import type { Context } from "../../types/context";
1
+ import type { BuildContext, ComponentContext } from "../../types/context";
2
2
  import type { GitlabJobCache } from "../../types/gitlab-types";
3
- export declare const getYarnCache: (context: Context, policy?: string) => GitlabJobCache[];
4
- export declare const getNodeModulesCache: (context: Context, policy?: string) => GitlabJobCache[];
5
- export declare const getNodeCache: (context: Context, policy?: string) => GitlabJobCache[];
6
- export declare const getNextCache: (context: Context) => GitlabJobCache[];
3
+ export declare const getYarnCache: (context: BuildContext, policy?: string) => GitlabJobCache[];
4
+ export declare const getNodeModulesCache: (context: BuildContext, policy?: string) => GitlabJobCache[];
5
+ export declare const getNodeCache: (context: BuildContext, policy?: string) => GitlabJobCache[];
6
+ export declare const getNextCache: (context: ComponentContext) => GitlabJobCache[];
@@ -54,9 +54,9 @@ var getYarnCache = function (context, policy) {
54
54
  policy: policy,
55
55
  paths: [".yarn"]
56
56
  } : {
57
- key: (0, slugify_1.default)(context.componentConfig.dir) + "-yarn",
57
+ key: (0, slugify_1.default)(context.dir) + "-yarn",
58
58
  policy: policy,
59
- paths: [(0, path_1.join)(context.componentConfig.dir, ".yarn")]
59
+ paths: [(0, path_1.join)(context.dir, ".yarn")]
60
60
  }];
61
61
  };
62
62
  exports.getYarnCache = getYarnCache;
@@ -70,12 +70,12 @@ var getNodeModulesCache = function (context, policy) {
70
70
  // It would slow down all pipelines whenever one adds a new dependency as it will need to download all node_modules again.
71
71
  return [{
72
72
  // if component is in a shared workspace, use workspace cache. use individual cache else
73
- key: componentIsInWorkspace ? "node-modules-workspace" : (0, slugify_1.default)(context.componentConfig.dir) + "-node-modules",
73
+ key: componentIsInWorkspace ? "node-modules-workspace" : (0, slugify_1.default)(context.dir) + "-node-modules",
74
74
  // we use the dirname, not the component name, because in certain cases we have two apps in the same directory and want to share the cache, e.g. when having storybook in the same package.json
75
75
  policy: policy,
76
76
  paths: __spreadArray([], __read(componentIsInWorkspace ? (0, lodash_1.uniq)(__spreadArray(["node_modules"], __read((_c = (_b = context.packageManagerInfo) === null || _b === void 0 ? void 0 : _b.workspaces.map(function (w) {
77
77
  return (0, path_1.join)(w.location, "node_modules");
78
- })) !== null && _c !== void 0 ? _c : []), false)) : [(0, path_1.join)(context.componentConfig.dir, "node_modules")]), false)
78
+ })) !== null && _c !== void 0 ? _c : []), false)) : [(0, path_1.join)(context.dir, "node_modules")]), false)
79
79
  }];
80
80
  };
81
81
  exports.getNodeModulesCache = getNodeModulesCache;
@@ -1,5 +1,5 @@
1
- import type { Context } from "../../types/context";
1
+ import type { ComponentContext } from "../../types/context";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
- export declare const createNodeJobs: (context: Context) => CatladderJob[];
4
- export declare const createStorybookJobs: (context: Context) => CatladderJob[];
5
- export declare const createMeteorJobs: (context: Context) => CatladderJob[];
3
+ export declare const createNodeJobs: (context: ComponentContext) => CatladderJob[];
4
+ export declare const createStorybookJobs: (context: ComponentContext) => CatladderJob[];
5
+ export declare const createMeteorJobs: (context: ComponentContext) => CatladderJob[];
@@ -1,3 +1,3 @@
1
- import type { Context } from "../../types/context";
1
+ import type { ComponentContext } from "../../types/context";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
- export declare const createMeteorBuildJobs: (context: Context) => CatladderJob[];
3
+ export declare const createMeteorBuildJobs: (context: ComponentContext) => CatladderJob[];
@@ -54,10 +54,10 @@ var createMeteorBuildJobs = function (context) {
54
54
  if (!(0, types_1.isOfBuildType)(buildConfig, "meteor")) {
55
55
  throw new Error("deploy config is not meteor");
56
56
  }
57
- var yarnInstall = (0, yarn_1.getYarnInstall)(context);
57
+ var yarnInstall = (0, yarn_1.getYarnInstall)(context.buildContext);
58
58
  return (0, base_1.createBuildJobs)(context, {
59
59
  appBuild: buildConfig.buildCommand !== null ? {
60
- cache: __spreadArray(__spreadArray([], __read((0, cache_1.getNodeCache)(context)), false), __read(getMeteorCache(context)), false),
60
+ cache: __spreadArray(__spreadArray([], __read((0, cache_1.getNodeCache)(context.buildContext)), false), __read(getMeteorCache(context)), false),
61
61
  image: (0, runner_1.getRunnerImage)("jobs-meteor"),
62
62
  variables: {
63
63
  METEOR_DISABLE_OPTIMISTIC_CACHING: "1" // see https://forums.meteor.com/t/veeery-long-building-time-inside-docker-container/58673/17?u=macrozone
@@ -1,3 +1,3 @@
1
- import type { Context } from "../../types/context";
1
+ import type { ComponentContext } from "../../types/context";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
- export declare const createNodeTestJobs: (context: Context) => CatladderJob[];
3
+ export declare const createNodeTestJobs: (context: ComponentContext) => CatladderJob[];
@@ -69,13 +69,13 @@ var createNodeTestJobs = function (context) {
69
69
  needs: [],
70
70
  envMode: "none"
71
71
  };
72
- var yarnInstall = (0, yarn_1.getYarnInstall)(context);
72
+ var yarnInstall = (0, yarn_1.getYarnInstall)(context.buildContext);
73
73
  var auditJob = buildConfig.audit !== false ? __assign(__assign(__assign({
74
74
  name: "๐Ÿ›ก audit"
75
75
  }, base), {
76
76
  image: (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : defaultImage,
77
77
  cache: undefined,
78
- script: __spreadArray(["cd ".concat(context.componentConfig.dir)], __read((_e = (0, utils_1.ensureArray)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : [((_f = context.packageManagerInfo) === null || _f === void 0 ? void 0 : _f.isClassic) ? "yarn audit" : "yarn npm audit --environment production" // yarn 2
78
+ script: __spreadArray(["cd ".concat(context.componentConfig.dir)], __read((_e = (0, utils_1.ensureArray)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : [((_f = context.buildContext.packageManagerInfo) === null || _f === void 0 ? void 0 : _f.isClassic) ? "yarn audit" : "yarn npm audit --environment production" // yarn 2
79
79
  ]), false),
80
80
  allow_failure: true
81
81
  }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_g = buildConfig.audit) === null || _g === void 0 ? void 0 : _g.artifactsReports, (_h = buildConfig.audit) === null || _h === void 0 ? void 0 : _h.artifacts)) : null;
@@ -83,15 +83,15 @@ var createNodeTestJobs = function (context) {
83
83
  name: "๐Ÿ‘ฎ lint"
84
84
  }, base), {
85
85
  image: (_k = (_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.jobImage) !== null && _k !== void 0 ? _k : defaultImage,
86
- cache: (0, cache_1.getNodeCache)(context),
87
- script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), ["cd ".concat(context.componentConfig.dir)], false), __read(yarnInstall), false), __read((_m = (0, utils_1.ensureArray)((_l = buildConfig.lint) === null || _l === void 0 ? void 0 : _l.command)) !== null && _m !== void 0 ? _m : ["yarn lint"]), false)
86
+ cache: (0, cache_1.getNodeCache)(context.buildContext),
87
+ script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context.buildContext)), false), ["cd ".concat(context.componentConfig.dir)], false), __read(yarnInstall), false), __read((_m = (0, utils_1.ensureArray)((_l = buildConfig.lint) === null || _l === void 0 ? void 0 : _l.command)) !== null && _m !== void 0 ? _m : ["yarn lint"]), false)
88
88
  }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_o = buildConfig.lint) === null || _o === void 0 ? void 0 : _o.artifactsReports, (_p = buildConfig.lint) === null || _p === void 0 ? void 0 : _p.artifacts)) : null;
89
89
  var testJob = buildConfig.test !== false ? __assign(__assign(__assign({
90
90
  name: "๐Ÿงช test"
91
91
  }, base), {
92
92
  image: (_r = (_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.jobImage) !== null && _r !== void 0 ? _r : (0, runner_1.getRunnerImage)("jobs-testing-chrome"),
93
- cache: (0, cache_1.getNodeCache)(context),
94
- script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), ["cd ".concat(context.componentConfig.dir)], false), __read(yarnInstall), false), __read((_t = (0, utils_1.ensureArray)((_s = buildConfig.test) === null || _s === void 0 ? void 0 : _s.command)) !== null && _t !== void 0 ? _t : ["yarn test"]), false)
93
+ cache: (0, cache_1.getNodeCache)(context.buildContext),
94
+ script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context.buildContext)), false), ["cd ".concat(context.componentConfig.dir)], false), __read(yarnInstall), false), __read((_t = (0, utils_1.ensureArray)((_s = buildConfig.test) === null || _s === void 0 ? void 0 : _s.command)) !== null && _t !== void 0 ? _t : ["yarn test"]), false)
95
95
  }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_u = buildConfig.test) === null || _u === void 0 ? void 0 : _u.artifactsReports, (_v = buildConfig.test) === null || _v === void 0 ? void 0 : _v.artifacts)) : null;
96
96
  return [auditJob, lintJob, testJob].filter(utils_1.notNil);
97
97
  };
@@ -1,7 +1,7 @@
1
1
  import { BashExpression } from "../../bash/BashExpression";
2
- import type { Context } from "../../types";
3
- export declare const ensureNodeVersion: (context: Context) => string[];
4
- export declare const getYarnInstall: (context: Context, options?: {
2
+ import type { BuildContext } from "../../types";
3
+ export declare const ensureNodeVersion: (context: BuildContext) => string[];
4
+ export declare const getYarnInstall: (context: BuildContext, options?: {
5
5
  noCustomPostInstall: boolean;
6
6
  }) => string[];
7
- export declare const getDockerAppCopyAndBuildScript: (context: Context) => BashExpression;
7
+ export declare const getDockerAppCopyAndBuildScript: (context: BuildContext) => BashExpression;
@@ -54,7 +54,7 @@ var ensureNodeVersion = function (context) {
54
54
  exports.ensureNodeVersion = ensureNodeVersion;
55
55
  var getYarnInstall = function (context, options) {
56
56
  var _a;
57
- var postInstall = "postInstall" in context.componentConfig.build ? context.componentConfig.build.postInstall : null;
57
+ var postInstall = "postInstall" in context.config ? context.config.postInstall : null;
58
58
  return __spreadArray(__spreadArray(__spreadArray([], __read((0, exports.ensureNodeVersion)(context)), false), __read((0, gitlab_1.collapseableSection)("yarninstall", "Yarn install")([getYarnInstallCommand(context)])), false), __read(postInstall && !(options === null || options === void 0 ? void 0 : options.noCustomPostInstall) ? (0, gitlab_1.collapseableSection)("postinstall", "Custom post install")((_a = (0, utils_1.ensureArray)(postInstall)) !== null && _a !== void 0 ? _a : []) : []), false);
59
59
  };
60
60
  exports.getYarnInstall = getYarnInstall;
@@ -1,3 +1,3 @@
1
- import type { Context } from "../..";
1
+ import type { ComponentContext } from "../..";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
- export declare const createRailsBuildJobs: (context: Context) => CatladderJob[];
3
+ export declare const createRailsBuildJobs: (context: ComponentContext) => CatladderJob[];
@@ -1,3 +1,3 @@
1
- import type { Context } from "../../types";
1
+ import type { ComponentContext } from "../../types";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
- export declare const createRailsJobs: (context: Context) => CatladderJob[];
3
+ export declare const createRailsJobs: (context: ComponentContext) => CatladderJob[];
@@ -1,3 +1,3 @@
1
- import type { Context } from "../..";
1
+ import type { ComponentContext } from "../..";
2
2
  import type { CatladderJob } from "../../types/jobs";
3
- export declare const createRailsTestJobs: (context: Context) => CatladderJob[];
3
+ export declare const createRailsTestJobs: (context: ComponentContext) => CatladderJob[];
@@ -1,5 +1,5 @@
1
- import type { Context } from "../types/context";
1
+ import type { ComponentContext } from "../types/context";
2
2
  import type { CatladderJob } from "../types/jobs";
3
3
  export declare const SBOM_BUILD_JOB_NAME = "\uD83E\uDDFE sbom";
4
4
  export declare const SBOM_FILE = "__sbom.json";
5
- export declare const createSbomBuildJob: (context: Context) => CatladderJob;
5
+ export declare const createSbomBuildJob: (context: ComponentContext) => CatladderJob;
@@ -11,7 +11,7 @@ var createSbomBuildJob = function (context) {
11
11
  var _a, _b, _c, _d, _e;
12
12
  var buildConfig = context.componentConfig.build;
13
13
  var defaultImage = "aquasec/trivy:0.38.3";
14
- var defaultScript = ["trivy fs --quiet --format cyclonedx --output \"".concat(exports.SBOM_FILE, "\" ").concat(((_a = context.packageManagerInfo) === null || _a === void 0 ? void 0 : _a.componentIsInWorkspace) ? "." : context.componentConfig.dir)];
14
+ var defaultScript = ["trivy fs --quiet --format cyclonedx --output \"".concat(exports.SBOM_FILE, "\" ").concat(((_a = context.buildContext.packageManagerInfo) === null || _a === void 0 ? void 0 : _a.componentIsInWorkspace) ? "." : context.buildContext.dir)];
15
15
  var image = buildConfig.type === "custom" && buildConfig.sbom !== false ? (_c = (_b = buildConfig.sbom) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : defaultImage : defaultImage;
16
16
  var script = buildConfig.type === "custom" && buildConfig.sbom !== false ? (_e = (0, utils_1.ensureArray)((_d = buildConfig.sbom) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : defaultScript : defaultScript;
17
17
  return {