@catladder/pipeline 1.81.4 → 1.82.0

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.
@@ -0,0 +1,28 @@
1
+ import type { Config } from "../src";
2
+ import { createAllPipelines } from "./__utils__/helpers";
3
+ const config: Config = {
4
+ appName: "test-app",
5
+ customerName: "pan",
6
+ components: {
7
+ api: {
8
+ dir: "api",
9
+ build: {
10
+ type: "node",
11
+ },
12
+ deploy: {
13
+ type: "google-cloudrun",
14
+ projectId: "google-project-id",
15
+ region: "europe-west6",
16
+
17
+ service: {
18
+ // defaults to 512Mi
19
+ memory: "1024Mi",
20
+ },
21
+ },
22
+ },
23
+ },
24
+ };
25
+
26
+ it("matches snapshot", async () => {
27
+ expect(await createAllPipelines(config)).toMatchSnapshot();
28
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@catladder/pipeline",
3
- "version": "1.81.4",
3
+ "version": "1.82.0",
4
4
  "scripts": {
5
5
  "build:tsc": "yarn tsc",
6
6
  "build": "yarn build:compile && yarn build:inline-variables && yarn build:bundle",
@@ -122,6 +122,7 @@ export const createGoogleCloudRunDeployJobs = (
122
122
  "min-instances": customConfig?.minInstances,
123
123
  "max-instances": customConfig?.maxInstances,
124
124
  "cpu-throttling": customConfig?.noCpuThrottling !== true,
125
+ memory: customConfig?.memory,
125
126
  "allow-unauthenticated": customConfig?.allowUnauthenticated ?? true,
126
127
  });
127
128
 
@@ -67,6 +67,8 @@ export type DeployConfigCloudRunCloudSql = {
67
67
  statement_cache_size?: number;
68
68
  };
69
69
  };
70
+
71
+ type Memory = `${number}${"M" | "G" | "Mi" | "Gi"}`;
70
72
  export type DeployConfigCloudRunService = {
71
73
  /**
72
74
  * command / entrypoint, fallsback to buildConfig.startcommand
@@ -93,6 +95,11 @@ export type DeployConfigCloudRunService = {
93
95
  * whether to allow public access (defaults to true)
94
96
  */
95
97
  allowUnauthenticated?: boolean;
98
+
99
+ /**
100
+ * memory limit. Defaults to 512MB
101
+ */
102
+ memory?: Memory;
96
103
  };
97
104
 
98
105
  export type DeployConfigCloudRunJobBase = {
@@ -234,6 +234,13 @@ export type DeployConfigKubernetesValues = AllowUnknownProps<{
234
234
  * It has the same environment variables as the application and an additional IS_WORKER="true" variable
235
235
  */
236
236
  worker?: KubernetesWorkerDef;
237
+
238
+ /**
239
+ * kubernetes resources for jobs and cronjobs
240
+ */
241
+ jobDefaults?: {
242
+ resources: KubernetesResourcesDef;
243
+ }
237
244
  }>;
238
245
 
239
246
  /**