@catladder/pipeline 1.163.1 → 1.164.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.
Files changed (80) hide show
  1. package/dist/bundles/catladder-gitlab/index.js +1 -1
  2. package/dist/constants.js +1 -1
  3. package/dist/deploy/cloudRun/createJobs/cloudRunServices.js +2 -0
  4. package/dist/deploy/types/googleCloudRun.d.ts +8 -0
  5. package/dist/tsconfig.tsbuildinfo +1 -1
  6. package/examples/__snapshots__/cloud-run-memory-limit.test.ts.snap +0 -1958
  7. package/examples/__snapshots__/cloud-run-meteor-with-worker.test.ts.snap +1 -1935
  8. package/examples/__snapshots__/cloud-run-no-cpu-throttling.test.ts.snap +1 -1959
  9. package/examples/__snapshots__/cloud-run-no-service.test.ts.snap +1 -2011
  10. package/examples/__snapshots__/cloud-run-non-public.test.ts.snap +1 -1959
  11. package/examples/__snapshots__/cloud-run-post-stop-job.test.ts.snap +1 -1970
  12. package/examples/__snapshots__/cloud-run-service-custom-vpc.test.ts.snap +1342 -0
  13. package/examples/__snapshots__/cloud-run-service-gen2.test.ts.snap +1 -1959
  14. package/examples/__snapshots__/cloud-run-service-increase-timout.test.ts.snap +1 -1959
  15. package/examples/__snapshots__/cloud-run-service-with-volumes.test.ts.snap +1 -2003
  16. package/examples/__snapshots__/cloud-run-storybook.test.ts.snap +1 -1675
  17. package/examples/__snapshots__/cloud-run-with-ngnix.test.ts.snap +1 -1959
  18. package/examples/__snapshots__/cloud-run-with-sql-reuse-db.test.ts.snap +1 -3935
  19. package/examples/__snapshots__/cloud-run-with-sql.test.ts.snap +1 -3458
  20. package/examples/__snapshots__/cloud-run-with-worker.test.ts.snap +1 -1967
  21. package/examples/__snapshots__/custom-build-job-with-tests.test.ts.snap +1 -1787
  22. package/examples/__snapshots__/custom-build-job.test.ts.snap +1 -1487
  23. package/examples/__snapshots__/custom-deploy.test.ts.snap +1 -1721
  24. package/examples/__snapshots__/custom-envs.test.ts.snap +1 -1175
  25. package/examples/__snapshots__/custom-sbom-java.test.ts.snap +1 -1495
  26. package/examples/__snapshots__/git-submodule.test.ts.snap +1 -1962
  27. package/examples/__snapshots__/kubernetes-application-customization.test.ts.snap +1 -2450
  28. package/examples/__snapshots__/kubernetes-with-cloud-sql-legacy.test.ts.snap +1 -2462
  29. package/examples/__snapshots__/kubernetes-with-cloud-sql.test.ts.snap +1 -2470
  30. package/examples/__snapshots__/kubernetes-with-jobs.test.ts.snap +1 -4558
  31. package/examples/__snapshots__/kubernetes-with-mongodb.test.ts.snap +1 -2574
  32. package/examples/__snapshots__/local-dot-env.test.ts.snap +1 -1959
  33. package/examples/__snapshots__/meteor-kubernetes.test.ts.snap +1 -2503
  34. package/examples/__snapshots__/multiline-var.test.ts.snap +1 -4488
  35. package/examples/__snapshots__/native-app.test.ts.snap +1 -3167
  36. package/examples/__snapshots__/node-build-with-custom-image.test.ts.snap +1 -1959
  37. package/examples/__snapshots__/node-build-with-docker-additions.test.ts.snap +1 -1967
  38. package/examples/__snapshots__/rails-k8s-with-worker-dockerfile.test.ts.snap +1479 -2003
  39. package/examples/__snapshots__/rails-k8s-with-worker.test.ts.snap +1 -1995
  40. package/examples/__snapshots__/wait-for-other-deploy.test.ts.snap +1 -2105
  41. package/examples/cloud-run-memory-limit.test.ts +1 -8
  42. package/examples/cloud-run-meteor-with-worker.test.ts +2 -9
  43. package/examples/cloud-run-no-cpu-throttling.test.ts +2 -9
  44. package/examples/cloud-run-no-service.test.ts +2 -9
  45. package/examples/cloud-run-non-public.test.ts +2 -9
  46. package/examples/cloud-run-post-stop-job.test.ts +2 -9
  47. package/examples/cloud-run-service-custom-vpc.test.ts +11 -0
  48. package/examples/cloud-run-service-custom-vpc.ts +30 -0
  49. package/examples/cloud-run-service-gen2.test.ts +2 -9
  50. package/examples/cloud-run-service-increase-timout.test.ts +2 -9
  51. package/examples/cloud-run-service-with-volumes.test.ts +2 -9
  52. package/examples/cloud-run-storybook.test.ts +2 -9
  53. package/examples/cloud-run-with-ngnix.test.ts +2 -9
  54. package/examples/cloud-run-with-sql-reuse-db.test.ts +2 -9
  55. package/examples/cloud-run-with-sql.test.ts +2 -9
  56. package/examples/cloud-run-with-worker.test.ts +2 -9
  57. package/examples/custom-build-job-with-tests.test.ts +2 -9
  58. package/examples/custom-build-job.test.ts +2 -9
  59. package/examples/custom-deploy.test.ts +2 -9
  60. package/examples/custom-envs.test.ts +2 -9
  61. package/examples/custom-sbom-java.test.ts +2 -9
  62. package/examples/git-submodule.test.ts +2 -9
  63. package/examples/kubernetes-application-customization.test.ts +2 -9
  64. package/examples/kubernetes-with-cloud-sql-legacy.test.ts +2 -9
  65. package/examples/kubernetes-with-cloud-sql.test.ts +2 -9
  66. package/examples/kubernetes-with-jobs.test.ts +2 -9
  67. package/examples/kubernetes-with-mongodb.test.ts +2 -9
  68. package/examples/local-dot-env.test.ts +2 -9
  69. package/examples/meteor-kubernetes.test.ts +2 -9
  70. package/examples/multiline-var.test.ts +2 -9
  71. package/examples/native-app.test.ts +2 -9
  72. package/examples/node-build-with-custom-image.test.ts +2 -9
  73. package/examples/node-build-with-docker-additions.test.ts +2 -9
  74. package/examples/rails-k8s-with-worker-dockerfile.test.ts +2 -2
  75. package/examples/rails-k8s-with-worker.test.ts +2 -9
  76. package/examples/wait-for-other-deploy.test.ts +2 -9
  77. package/package.json +1 -1
  78. package/scripts/generate-examples-test.ts +3 -5
  79. package/src/deploy/cloudRun/createJobs/cloudRunServices.ts +2 -0
  80. package/src/deploy/types/googleCloudRun.ts +9 -0
@@ -1,7 +1,4 @@
1
- import {
2
- createAllPipelines,
3
- createYamlLocalPipeline,
4
- } from "./__utils__/helpers";
1
+ import { createYamlLocalPipeline } from "./__utils__/helpers";
5
2
  import config from "./native-app";
6
3
 
7
4
  /**
@@ -9,10 +6,6 @@ import config from "./native-app";
9
6
  * Modifications will be overwritten on every `yarn test` run!
10
7
  */
11
8
 
12
- it("matches snapshot for native-app", async () => {
13
- expect(await createAllPipelines(config)).toMatchSnapshot();
14
- });
15
-
16
- it("matches snapshot for cloud-run-memory-limit local pipeline YAML", async () => {
9
+ it("matches snapshot for native-app local pipeline YAML", async () => {
17
10
  expect(await createYamlLocalPipeline(config)).toMatchSnapshot();
18
11
  });
@@ -1,7 +1,4 @@
1
- import {
2
- createAllPipelines,
3
- createYamlLocalPipeline,
4
- } from "./__utils__/helpers";
1
+ import { createYamlLocalPipeline } from "./__utils__/helpers";
5
2
  import config from "./node-build-with-custom-image";
6
3
 
7
4
  /**
@@ -9,10 +6,6 @@ import config from "./node-build-with-custom-image";
9
6
  * Modifications will be overwritten on every `yarn test` run!
10
7
  */
11
8
 
12
- it("matches snapshot for node-build-with-custom-image", async () => {
13
- expect(await createAllPipelines(config)).toMatchSnapshot();
14
- });
15
-
16
- it("matches snapshot for cloud-run-memory-limit local pipeline YAML", async () => {
9
+ it("matches snapshot for node-build-with-custom-image local pipeline YAML", async () => {
17
10
  expect(await createYamlLocalPipeline(config)).toMatchSnapshot();
18
11
  });
@@ -1,7 +1,4 @@
1
- import {
2
- createAllPipelines,
3
- createYamlLocalPipeline,
4
- } from "./__utils__/helpers";
1
+ import { createYamlLocalPipeline } from "./__utils__/helpers";
5
2
  import config from "./node-build-with-docker-additions";
6
3
 
7
4
  /**
@@ -9,10 +6,6 @@ import config from "./node-build-with-docker-additions";
9
6
  * Modifications will be overwritten on every `yarn test` run!
10
7
  */
11
8
 
12
- it("matches snapshot for node-build-with-docker-additions", async () => {
13
- expect(await createAllPipelines(config)).toMatchSnapshot();
14
- });
15
-
16
- it("matches snapshot for cloud-run-memory-limit local pipeline YAML", async () => {
9
+ it("matches snapshot for node-build-with-docker-additions local pipeline YAML", async () => {
17
10
  expect(await createYamlLocalPipeline(config)).toMatchSnapshot();
18
11
  });
@@ -1,9 +1,9 @@
1
1
  import { rmSync, writeFileSync } from "fs";
2
- import { createAllPipelines } from "./__utils__/helpers";
2
+ import { createYamlLocalPipeline } from "./__utils__/helpers";
3
3
  import config from "./rails-k8s-with-worker";
4
4
 
5
5
  it("matches snapshot with a Dockerfile", async () => {
6
6
  writeFileSync("Dockerfile", "");
7
- expect(await createAllPipelines(config)).toMatchSnapshot();
7
+ expect(await createYamlLocalPipeline(config)).toMatchSnapshot();
8
8
  rmSync("Dockerfile");
9
9
  });
@@ -1,7 +1,4 @@
1
- import {
2
- createAllPipelines,
3
- createYamlLocalPipeline,
4
- } from "./__utils__/helpers";
1
+ import { createYamlLocalPipeline } from "./__utils__/helpers";
5
2
  import config from "./rails-k8s-with-worker";
6
3
 
7
4
  /**
@@ -9,10 +6,6 @@ import config from "./rails-k8s-with-worker";
9
6
  * Modifications will be overwritten on every `yarn test` run!
10
7
  */
11
8
 
12
- it("matches snapshot for rails-k8s-with-worker", async () => {
13
- expect(await createAllPipelines(config)).toMatchSnapshot();
14
- });
15
-
16
- it("matches snapshot for cloud-run-memory-limit local pipeline YAML", async () => {
9
+ it("matches snapshot for rails-k8s-with-worker local pipeline YAML", async () => {
17
10
  expect(await createYamlLocalPipeline(config)).toMatchSnapshot();
18
11
  });
@@ -1,7 +1,4 @@
1
- import {
2
- createAllPipelines,
3
- createYamlLocalPipeline,
4
- } from "./__utils__/helpers";
1
+ import { createYamlLocalPipeline } from "./__utils__/helpers";
5
2
  import config from "./wait-for-other-deploy";
6
3
 
7
4
  /**
@@ -9,10 +6,6 @@ import config from "./wait-for-other-deploy";
9
6
  * Modifications will be overwritten on every `yarn test` run!
10
7
  */
11
8
 
12
- it("matches snapshot for wait-for-other-deploy", async () => {
13
- expect(await createAllPipelines(config)).toMatchSnapshot();
14
- });
15
-
16
- it("matches snapshot for cloud-run-memory-limit local pipeline YAML", async () => {
9
+ it("matches snapshot for wait-for-other-deploy local pipeline YAML", async () => {
17
10
  expect(await createYamlLocalPipeline(config)).toMatchSnapshot();
18
11
  });
package/package.json CHANGED
@@ -53,7 +53,7 @@
53
53
  }
54
54
  ],
55
55
  "license": "MIT",
56
- "version": "1.163.1",
56
+ "version": "1.164.0",
57
57
  "scripts": {
58
58
  "build:tsc": "yarn tsc",
59
59
  "build": "yarn build:compile && yarn build:inline-variables && yarn build:bundle",
@@ -63,16 +63,14 @@ async function main() {
63
63
  exampleFiles.map(async (exampleFile) => {
64
64
  const kebabName = basename(exampleFile, ".ts");
65
65
  const testFileContent = [
66
- `import { createAllPipelines, createYamlLocalPipeline } from "./__utils__/helpers";`,
66
+ `import { createYamlLocalPipeline } from "./__utils__/helpers";`,
67
67
  `import config from "./${kebabName}";`,
68
68
  `\n/**`,
69
69
  ` * This test is auto-generated.`,
70
70
  ` * Modifications will be overwritten on every \`yarn test\` run!`,
71
71
  ` */\n`,
72
- `it("matches snapshot for ${kebabName}", async () => {`,
73
- ` expect(await createAllPipelines(config)).toMatchSnapshot();`,
74
- `});\n`,
75
- `it("matches snapshot for cloud-run-memory-limit local pipeline YAML", async () => {`,
72
+
73
+ `it("matches snapshot for ${kebabName} local pipeline YAML", async () => {`,
76
74
  ` expect(await createYamlLocalPipeline(config)).toMatchSnapshot();`,
77
75
  `});\n`,
78
76
  ].join("\n");
@@ -50,6 +50,8 @@ export const getServiceDeployScript = (
50
50
  cpu: customConfig?.cpu,
51
51
  memory: customConfig?.memory,
52
52
  timeout: customConfig?.timeout,
53
+ "vpc-connector": customConfig?.vpcConnector,
54
+ "vpc-egress": customConfig?.vpcEgress,
53
55
  "allow-unauthenticated": customConfig?.allowUnauthenticated ?? true,
54
56
  ingress: customConfig?.ingress ?? "all",
55
57
  "cpu-boost": true,
@@ -157,6 +157,15 @@ export type DeployConfigCloudRunService = {
157
157
  * defaults to gen1 according to gcloud
158
158
  */
159
159
  executionEnvironment?: "gen2" | "gen1";
160
+
161
+ /**
162
+ * vpc connector,
163
+ */
164
+ vpcConnector?: string;
165
+ /**
166
+ * vpc egress, see https://cloud.google.com/sdk/gcloud/reference/run/deploy#--vpc-egress
167
+ */
168
+ vpcEgress?: "all-traffic" | "private-ranges-only";
160
169
  } & DeployConfigCloudRunWithVolumes;
161
170
 
162
171
  export type DeployConfigCloudRunJobBase = {