@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.
- package/dist/bundles/catladder-gitlab/index.js +1 -1
- package/dist/constants.js +1 -1
- package/dist/deploy/cloudRun/createJobs/cloudRunServices.js +2 -0
- package/dist/deploy/types/googleCloudRun.d.ts +8 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/examples/__snapshots__/cloud-run-memory-limit.test.ts.snap +0 -1958
- package/examples/__snapshots__/cloud-run-meteor-with-worker.test.ts.snap +1 -1935
- package/examples/__snapshots__/cloud-run-no-cpu-throttling.test.ts.snap +1 -1959
- package/examples/__snapshots__/cloud-run-no-service.test.ts.snap +1 -2011
- package/examples/__snapshots__/cloud-run-non-public.test.ts.snap +1 -1959
- package/examples/__snapshots__/cloud-run-post-stop-job.test.ts.snap +1 -1970
- package/examples/__snapshots__/cloud-run-service-custom-vpc.test.ts.snap +1342 -0
- package/examples/__snapshots__/cloud-run-service-gen2.test.ts.snap +1 -1959
- package/examples/__snapshots__/cloud-run-service-increase-timout.test.ts.snap +1 -1959
- package/examples/__snapshots__/cloud-run-service-with-volumes.test.ts.snap +1 -2003
- package/examples/__snapshots__/cloud-run-storybook.test.ts.snap +1 -1675
- package/examples/__snapshots__/cloud-run-with-ngnix.test.ts.snap +1 -1959
- package/examples/__snapshots__/cloud-run-with-sql-reuse-db.test.ts.snap +1 -3935
- package/examples/__snapshots__/cloud-run-with-sql.test.ts.snap +1 -3458
- package/examples/__snapshots__/cloud-run-with-worker.test.ts.snap +1 -1967
- package/examples/__snapshots__/custom-build-job-with-tests.test.ts.snap +1 -1787
- package/examples/__snapshots__/custom-build-job.test.ts.snap +1 -1487
- package/examples/__snapshots__/custom-deploy.test.ts.snap +1 -1721
- package/examples/__snapshots__/custom-envs.test.ts.snap +1 -1175
- package/examples/__snapshots__/custom-sbom-java.test.ts.snap +1 -1495
- package/examples/__snapshots__/git-submodule.test.ts.snap +1 -1962
- package/examples/__snapshots__/kubernetes-application-customization.test.ts.snap +1 -2450
- package/examples/__snapshots__/kubernetes-with-cloud-sql-legacy.test.ts.snap +1 -2462
- package/examples/__snapshots__/kubernetes-with-cloud-sql.test.ts.snap +1 -2470
- package/examples/__snapshots__/kubernetes-with-jobs.test.ts.snap +1 -4558
- package/examples/__snapshots__/kubernetes-with-mongodb.test.ts.snap +1 -2574
- package/examples/__snapshots__/local-dot-env.test.ts.snap +1 -1959
- package/examples/__snapshots__/meteor-kubernetes.test.ts.snap +1 -2503
- package/examples/__snapshots__/multiline-var.test.ts.snap +1 -4488
- package/examples/__snapshots__/native-app.test.ts.snap +1 -3167
- package/examples/__snapshots__/node-build-with-custom-image.test.ts.snap +1 -1959
- package/examples/__snapshots__/node-build-with-docker-additions.test.ts.snap +1 -1967
- package/examples/__snapshots__/rails-k8s-with-worker-dockerfile.test.ts.snap +1479 -2003
- package/examples/__snapshots__/rails-k8s-with-worker.test.ts.snap +1 -1995
- package/examples/__snapshots__/wait-for-other-deploy.test.ts.snap +1 -2105
- package/examples/cloud-run-memory-limit.test.ts +1 -8
- package/examples/cloud-run-meteor-with-worker.test.ts +2 -9
- package/examples/cloud-run-no-cpu-throttling.test.ts +2 -9
- package/examples/cloud-run-no-service.test.ts +2 -9
- package/examples/cloud-run-non-public.test.ts +2 -9
- package/examples/cloud-run-post-stop-job.test.ts +2 -9
- package/examples/cloud-run-service-custom-vpc.test.ts +11 -0
- package/examples/cloud-run-service-custom-vpc.ts +30 -0
- package/examples/cloud-run-service-gen2.test.ts +2 -9
- package/examples/cloud-run-service-increase-timout.test.ts +2 -9
- package/examples/cloud-run-service-with-volumes.test.ts +2 -9
- package/examples/cloud-run-storybook.test.ts +2 -9
- package/examples/cloud-run-with-ngnix.test.ts +2 -9
- package/examples/cloud-run-with-sql-reuse-db.test.ts +2 -9
- package/examples/cloud-run-with-sql.test.ts +2 -9
- package/examples/cloud-run-with-worker.test.ts +2 -9
- package/examples/custom-build-job-with-tests.test.ts +2 -9
- package/examples/custom-build-job.test.ts +2 -9
- package/examples/custom-deploy.test.ts +2 -9
- package/examples/custom-envs.test.ts +2 -9
- package/examples/custom-sbom-java.test.ts +2 -9
- package/examples/git-submodule.test.ts +2 -9
- package/examples/kubernetes-application-customization.test.ts +2 -9
- package/examples/kubernetes-with-cloud-sql-legacy.test.ts +2 -9
- package/examples/kubernetes-with-cloud-sql.test.ts +2 -9
- package/examples/kubernetes-with-jobs.test.ts +2 -9
- package/examples/kubernetes-with-mongodb.test.ts +2 -9
- package/examples/local-dot-env.test.ts +2 -9
- package/examples/meteor-kubernetes.test.ts +2 -9
- package/examples/multiline-var.test.ts +2 -9
- package/examples/native-app.test.ts +2 -9
- package/examples/node-build-with-custom-image.test.ts +2 -9
- package/examples/node-build-with-docker-additions.test.ts +2 -9
- package/examples/rails-k8s-with-worker-dockerfile.test.ts +2 -2
- package/examples/rails-k8s-with-worker.test.ts +2 -9
- package/examples/wait-for-other-deploy.test.ts +2 -9
- package/package.json +1 -1
- package/scripts/generate-examples-test.ts +3 -5
- package/src/deploy/cloudRun/createJobs/cloudRunServices.ts +2 -0
- 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 {
|
|
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
|
|
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
|
@@ -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 {
|
|
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
|
-
|
|
73
|
-
`
|
|
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 = {
|