@catladder/pipeline 1.163.2 → 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-service-custom-vpc.test.ts.snap +1342 -0
- package/examples/cloud-run-service-custom-vpc.test.ts +11 -0
- package/examples/cloud-run-service-custom-vpc.ts +30 -0
- package/package.json +1 -1
- package/src/deploy/cloudRun/createJobs/cloudRunServices.ts +2 -0
- package/src/deploy/types/googleCloudRun.ts +9 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createYamlLocalPipeline } from "./__utils__/helpers";
|
|
2
|
+
import config from "./cloud-run-service-custom-vpc";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* This test is auto-generated.
|
|
6
|
+
* Modifications will be overwritten on every `yarn test` run!
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
it("matches snapshot for cloud-run-service-custom-vpc local pipeline YAML", async () => {
|
|
10
|
+
expect(await createYamlLocalPipeline(config)).toMatchSnapshot();
|
|
11
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Config } from "../src";
|
|
2
|
+
|
|
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
|
+
vpcConnector: "my-first-vpc-connector",
|
|
19
|
+
vpcEgress: "all-traffic",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default config;
|
|
27
|
+
|
|
28
|
+
export const information = {
|
|
29
|
+
title: "Cloud Run: Service with custom vpc settings",
|
|
30
|
+
};
|
package/package.json
CHANGED
|
@@ -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 = {
|