@catladder/pipeline 3.5.0 → 3.7.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/build/artifacts/createBuildJobArtifact.js +1 -1
- package/dist/build/base/index.d.ts +2 -3
- package/dist/build/cache/getAllCacheConfigsFromConfig.js +2 -2
- package/dist/build/custom/buildJob.d.ts +2 -2
- package/dist/build/custom/index.d.ts +2 -2
- package/dist/build/custom/testJob.d.ts +2 -2
- package/dist/build/docker.d.ts +4 -4
- package/dist/build/index.d.ts +2 -2
- package/dist/build/node/buildJob.d.ts +5 -3
- package/dist/build/node/index.d.ts +4 -4
- package/dist/build/node/meteor.d.ts +2 -2
- package/dist/build/node/yarn.d.ts +1 -1
- package/dist/build/node/yarn.js +1 -1
- package/dist/build/rails/build.d.ts +2 -2
- package/dist/build/rails/index.d.ts +2 -2
- package/dist/build/sbom.d.ts +2 -2
- package/dist/constants.js +1 -1
- package/dist/context/createComponentContext.js +11 -4
- package/dist/context/getLabels.js +1 -1
- package/dist/deploy/cloudRun/createJobs/cloudRunJobs.js +2 -2
- package/dist/deploy/cloudRun/createJobs/cloudRunServices.js +28 -10
- package/dist/deploy/cloudRun/createJobs/execute/onDeploy.d.ts +2 -3
- package/dist/deploy/cloudRun/createJobs/execute/onDeploy.js +4 -9
- package/dist/deploy/cloudRun/utils/getJobOrServiceArgs.d.ts +2 -0
- package/dist/deploy/cloudRun/utils/getJobOrServiceArgs.js +12 -0
- package/dist/deploy/kubernetes/kubeValues.d.ts +2 -2
- package/dist/deploy/kubernetes/kubeValues.js +1 -1
- package/dist/deploy/sbom.js +1 -1
- package/dist/deploy/types/googleCloudRun.d.ts +20 -0
- package/dist/pipeline/createJobsForComponent.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/config.d.ts +1 -1
- package/dist/types/context.d.ts +6 -1
- package/examples/__snapshots__/cloud-run-llama.test.ts.snap +624 -0
- package/examples/__snapshots__/cloud-run-with-gpu.test.ts.snap +1382 -0
- package/examples/cloud-run-llama.test.ts +11 -0
- package/examples/cloud-run-llama.ts +40 -0
- package/examples/cloud-run-with-gpu.test.ts +11 -0
- package/examples/cloud-run-with-gpu.ts +30 -0
- package/package.json +1 -1
- package/src/build/artifacts/createBuildJobArtifact.ts +3 -1
- package/src/build/base/index.ts +5 -2
- package/src/build/cache/getAllCacheConfigsFromConfig.ts +7 -6
- package/src/build/custom/buildJob.ts +2 -2
- package/src/build/custom/index.ts +4 -2
- package/src/build/custom/testJob.ts +2 -2
- package/src/build/docker.ts +8 -4
- package/src/build/index.ts +5 -2
- package/src/build/node/buildJob.ts +5 -2
- package/src/build/node/index.ts +9 -4
- package/src/build/node/meteor.ts +5 -2
- package/src/build/node/yarn.ts +4 -2
- package/src/build/rails/build.ts +3 -7
- package/src/build/rails/index.ts +4 -2
- package/src/build/sbom.ts +4 -2
- package/src/context/createComponentContext.ts +22 -9
- package/src/context/getLabels.ts +4 -1
- package/src/deploy/cloudRun/createJobs/cloudRunJobs.ts +2 -2
- package/src/deploy/cloudRun/createJobs/cloudRunServices.ts +24 -3
- package/src/deploy/cloudRun/createJobs/execute/onDeploy.ts +3 -13
- package/src/deploy/cloudRun/utils/getJobOrServiceArgs.ts +18 -0
- package/src/deploy/kubernetes/kubeValues.ts +13 -4
- package/src/deploy/sbom.ts +4 -3
- package/src/deploy/types/googleCloudRun.ts +23 -0
- package/src/pipeline/createJobsForComponent.ts +10 -2
- package/src/types/config.ts +1 -1
- package/src/types/context.ts +10 -1
package/src/deploy/sbom.ts
CHANGED
|
@@ -6,9 +6,10 @@ import {
|
|
|
6
6
|
} from "../types/context";
|
|
7
7
|
|
|
8
8
|
export const sbomDeactivated = (context: ComponentContext) =>
|
|
9
|
-
|
|
10
|
-
context
|
|
11
|
-
|
|
9
|
+
context.build.type === "disabled" ||
|
|
10
|
+
(componentContextIsStandaloneBuild(context) &&
|
|
11
|
+
context.build.config.type === "custom" &&
|
|
12
|
+
context.build.config.sbom === false);
|
|
12
13
|
|
|
13
14
|
export const getDependencyTrackUploadScript = (
|
|
14
15
|
context: ComponentContext,
|
|
@@ -168,6 +168,29 @@ export type DeployConfigCloudRunService = {
|
|
|
168
168
|
*
|
|
169
169
|
*/
|
|
170
170
|
http2?: boolean;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Number of GPUs to use. Defaults to 0
|
|
174
|
+
*
|
|
175
|
+
* This is a preview feature and not all regions support it.
|
|
176
|
+
*/
|
|
177
|
+
gpu?: number;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* gpu type to use. Refer to https://cloud.google.com/run/docs/configuring/services/gpu#gcloud for defaults
|
|
181
|
+
*/
|
|
182
|
+
gpuType?: string;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* the image to use. Defaults to the image from the build.
|
|
186
|
+
*
|
|
187
|
+
* If you specify an image, you usually want to disable the build by setting build: false
|
|
188
|
+
*/
|
|
189
|
+
image?: string;
|
|
190
|
+
/**
|
|
191
|
+
* args to pass to the command
|
|
192
|
+
*/
|
|
193
|
+
args?: string[];
|
|
171
194
|
} & DeployConfigCloudRunWithVolumes &
|
|
172
195
|
DeployConfigCloudRunNetworkConfig;
|
|
173
196
|
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { BUILD_TYPES } from "../build";
|
|
2
2
|
import { DEPLOY_TYPES } from "../deploy";
|
|
3
|
-
import type {
|
|
3
|
+
import type {
|
|
4
|
+
ComponentContext,
|
|
5
|
+
ComponentContextWithBuild,
|
|
6
|
+
} from "../types/context";
|
|
4
7
|
import type { CatladderJob } from "../types/jobs";
|
|
5
8
|
|
|
6
9
|
const injectDefaultVarsInCustomJobs = (
|
|
@@ -24,7 +27,12 @@ const getCustomJobs = (context: ComponentContext) => {
|
|
|
24
27
|
export const createJobsForComponentContext = (
|
|
25
28
|
context: ComponentContext,
|
|
26
29
|
): CatladderJob[] => {
|
|
27
|
-
const buildJobs =
|
|
30
|
+
const buildJobs =
|
|
31
|
+
context.build.type !== "disabled"
|
|
32
|
+
? BUILD_TYPES[context.build.buildType].jobs(
|
|
33
|
+
context as ComponentContextWithBuild,
|
|
34
|
+
)
|
|
35
|
+
: [];
|
|
28
36
|
const deployJobs =
|
|
29
37
|
context.componentConfig.deploy !== false
|
|
30
38
|
? DEPLOY_TYPES[context.componentConfig.deploy.type].jobs(context)
|
package/src/types/config.ts
CHANGED
package/src/types/context.ts
CHANGED
|
@@ -116,6 +116,9 @@ export type BuildContextStandalone<
|
|
|
116
116
|
buildType: C["type"];
|
|
117
117
|
};
|
|
118
118
|
|
|
119
|
+
export type BuildContextDisabled = BuildContextComponentBase & {
|
|
120
|
+
type: "disabled";
|
|
121
|
+
};
|
|
119
122
|
export type BuildContextFromWorkspace = BuildContextComponentBase & {
|
|
120
123
|
config: BuildConfigFromWorkspace;
|
|
121
124
|
workspaceName: string;
|
|
@@ -133,10 +136,14 @@ export type BuildContextWorkspace = BuildContextBase & {
|
|
|
133
136
|
config: WorkspaceBuildConfig;
|
|
134
137
|
};
|
|
135
138
|
|
|
136
|
-
export type
|
|
139
|
+
export type BuildContextWithBuild =
|
|
137
140
|
| BuildContextStandalone
|
|
138
141
|
| BuildContextFromWorkspace;
|
|
139
142
|
|
|
143
|
+
export type BuildContextComponent =
|
|
144
|
+
| BuildContextWithBuild
|
|
145
|
+
| BuildContextDisabled;
|
|
146
|
+
|
|
140
147
|
export type BuildContext = BuildContextComponent | BuildContextWorkspace;
|
|
141
148
|
|
|
142
149
|
export type DeployContext = {
|
|
@@ -172,6 +179,8 @@ export type ComponentContext<
|
|
|
172
179
|
customJobs?: CatladderJob[];
|
|
173
180
|
};
|
|
174
181
|
|
|
182
|
+
export type ComponentContextWithBuild = ComponentContext<BuildContextWithBuild>;
|
|
183
|
+
|
|
175
184
|
export type Context = ComponentContext | WorkspaceContext;
|
|
176
185
|
|
|
177
186
|
export type CatladderJobWithContext<S = BaseStage> = CatladderJob<S> & {
|