@catladder/pipeline 1.146.2 → 1.148.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/base/createAppBuildJob.js +6 -6
- package/dist/build/base/writeBuildInfo.js +1 -1
- package/dist/build/base/writeDotEnv.js +1 -1
- package/dist/build/custom/__tests__/testJob.test.js +11 -14
- package/dist/build/custom/buildJob.js +5 -5
- package/dist/build/custom/testJob.js +5 -5
- package/dist/build/docker.d.ts +26 -9
- package/dist/build/docker.js +41 -20
- package/dist/build/node/buildJob.js +8 -8
- package/dist/build/node/cache.js +1 -1
- package/dist/build/node/meteor.js +6 -6
- package/dist/build/node/testJob.js +11 -11
- package/dist/build/rails/build.js +3 -3
- package/dist/build/rails/test.js +4 -4
- package/dist/build/sbom.js +2 -2
- package/dist/build/types.d.ts +34 -26
- package/dist/bundles/catladder-gitlab/index.js +2 -2
- package/dist/constants.js +1 -1
- package/dist/context/getLabels.js +1 -1
- package/dist/context/index.js +34 -12
- package/dist/deploy/base/deploy.js +9 -8
- package/dist/deploy/cloudRun/artifactsRegistry.d.ts +1 -5
- package/dist/deploy/cloudRun/artifactsRegistry.js +8 -9
- package/dist/deploy/cloudRun/cloudRunRevisions.js +4 -5
- package/dist/deploy/cloudRun/createJobs/cloudRunServices.js +1 -1
- package/dist/deploy/cloudRun/createJobs/common.d.ts +4 -4
- package/dist/deploy/cloudRun/createJobs/common.js +2 -1
- package/dist/deploy/cloudRun/createJobs/index.js +2 -4
- package/dist/deploy/custom/deployJob.js +7 -10
- package/dist/deploy/dockerTag/deployJob.js +3 -5
- package/dist/deploy/kubernetes/cloudSql/index.js +11 -9
- package/dist/deploy/kubernetes/deployJob.js +4 -7
- package/dist/deploy/kubernetes/kubeEnv.js +2 -1
- package/dist/deploy/kubernetes/kubeValues.js +10 -10
- package/dist/deploy/kubernetes/mongodb.js +11 -11
- package/dist/deploy/sbom.js +1 -1
- package/dist/deploy/types/index.d.ts +1 -1
- package/dist/deploy/types/index.js +1 -1
- package/dist/deploy/utils.js +2 -1
- package/dist/pipeline/createJobsForComponent.js +5 -5
- package/dist/pipeline/generatePipelineFiles.js +40 -9
- package/dist/pipeline/gitlab/createGitlabJobs.js +2 -9
- package/dist/pipeline/gitlab/sortGitLabJobDefProps.d.ts +7 -0
- package/dist/pipeline/gitlab/sortGitLabJobDefProps.js +27 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/config.d.ts +1 -1
- package/dist/types/context.d.ts +13 -1
- package/dist/utils/removeUndefined.d.ts +1 -0
- package/dist/utils/removeUndefined.js +36 -0
- package/examples/__snapshots__/cloud-run-storybook.ts.snap +1687 -0
- package/examples/__snapshots__/cloud-run-with-ngnix.ts.snap +1971 -0
- package/examples/cloud-run-storybook.ts +24 -0
- package/examples/cloud-run-with-ngnix.ts +24 -0
- package/package.json +1 -1
- package/src/build/base/createAppBuildJob.ts +7 -7
- package/src/build/base/writeBuildInfo.ts +1 -1
- package/src/build/base/writeDotEnv.ts +1 -1
- package/src/build/custom/__tests__/testJob.test.ts +5 -8
- package/src/build/custom/buildJob.ts +6 -9
- package/src/build/custom/testJob.ts +5 -5
- package/src/build/docker.ts +68 -24
- package/src/build/node/buildJob.ts +12 -12
- package/src/build/node/cache.ts +1 -1
- package/src/build/node/meteor.ts +11 -17
- package/src/build/node/testJob.ts +14 -14
- package/src/build/rails/build.ts +3 -3
- package/src/build/rails/test.ts +4 -4
- package/src/build/sbom.ts +3 -3
- package/src/build/types.ts +53 -38
- package/src/context/getLabels.ts +1 -1
- package/src/context/index.ts +21 -5
- package/src/deploy/base/deploy.ts +8 -14
- package/src/deploy/cloudRun/artifactsRegistry.ts +5 -10
- package/src/deploy/cloudRun/cloudRunRevisions.ts +3 -5
- package/src/deploy/cloudRun/createJobs/cloudRunServices.ts +1 -1
- package/src/deploy/cloudRun/createJobs/common.ts +5 -5
- package/src/deploy/cloudRun/createJobs/index.ts +1 -4
- package/src/deploy/custom/deployJob.ts +4 -6
- package/src/deploy/dockerTag/deployJob.ts +2 -5
- package/src/deploy/kubernetes/cloudSql/index.ts +7 -4
- package/src/deploy/kubernetes/deployJob.ts +1 -4
- package/src/deploy/kubernetes/kubeEnv.ts +1 -1
- package/src/deploy/kubernetes/kubeValues.ts +3 -3
- package/src/deploy/kubernetes/mongodb.ts +6 -6
- package/src/deploy/sbom.ts +1 -2
- package/src/deploy/types/index.ts +2 -2
- package/src/deploy/utils.ts +1 -1
- package/src/pipeline/createJobsForComponent.ts +6 -10
- package/src/pipeline/generatePipelineFiles.ts +21 -8
- package/src/pipeline/gitlab/createGitlabJobs.ts +2 -7
- package/src/pipeline/gitlab/sortGitLabJobDefProps.ts +59 -0
- package/src/types/config.ts +3 -1
- package/src/types/context.ts +16 -1
- package/src/utils/removeUndefined.ts +4 -0
package/dist/types/context.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { StringOrBashExpression } from "../bash/BashExpression";
|
|
2
2
|
import type { BuildConfig } from "../build";
|
|
3
3
|
import type { PredefinedVariables, SecretEnvVar } from "../context";
|
|
4
|
+
import type { DeployConfig } from "../deploy";
|
|
4
5
|
import type { PipelineTrigger, ComponentConfig, Config, EnvType } from "./config";
|
|
5
6
|
import type { BaseStage, CatladderJob } from "./jobs";
|
|
6
7
|
import type { PipelineType } from "./pipeline";
|
|
@@ -69,10 +70,20 @@ export type BuildContext = {
|
|
|
69
70
|
packageManagerInfo?: PackageManagerInfo;
|
|
70
71
|
config: BuildConfig;
|
|
71
72
|
};
|
|
73
|
+
export type DeployContext = {
|
|
74
|
+
config: DeployConfig;
|
|
75
|
+
};
|
|
72
76
|
export type ComponentContext = {
|
|
73
77
|
componentName: string;
|
|
78
|
+
/**
|
|
79
|
+
* the merged component config.
|
|
80
|
+
*
|
|
81
|
+
* use build.config and deploy.config instead if you need something from there
|
|
82
|
+
*
|
|
83
|
+
*/
|
|
74
84
|
componentConfig: ComponentConfig;
|
|
75
|
-
|
|
85
|
+
build: BuildContext;
|
|
86
|
+
deploy?: DeployContext | null;
|
|
76
87
|
fullConfig: Config;
|
|
77
88
|
environment: Environment;
|
|
78
89
|
trigger?: PipelineTrigger;
|
|
@@ -81,6 +92,7 @@ export type ComponentContext = {
|
|
|
81
92
|
* @deprecated use buildContext.packageManagerInfo instead
|
|
82
93
|
*/
|
|
83
94
|
packageManagerInfo?: PackageManagerInfo;
|
|
95
|
+
customJobs?: CatladderJob[];
|
|
84
96
|
};
|
|
85
97
|
/**
|
|
86
98
|
* @deprecated use ComponentContext instead
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const removeUndefined: <T extends object>(obj: T) => T;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __read = this && this.__read || function (o, n) {
|
|
4
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
5
|
+
if (!m) return o;
|
|
6
|
+
var i = m.call(o),
|
|
7
|
+
r,
|
|
8
|
+
ar = [],
|
|
9
|
+
e;
|
|
10
|
+
try {
|
|
11
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
12
|
+
} catch (error) {
|
|
13
|
+
e = {
|
|
14
|
+
error: error
|
|
15
|
+
};
|
|
16
|
+
} finally {
|
|
17
|
+
try {
|
|
18
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
19
|
+
} finally {
|
|
20
|
+
if (e) throw e.error;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", {
|
|
26
|
+
value: true
|
|
27
|
+
});
|
|
28
|
+
exports.removeUndefined = void 0;
|
|
29
|
+
var removeUndefined = function (obj) {
|
|
30
|
+
return Object.fromEntries(Object.entries(obj).filter(function (_a) {
|
|
31
|
+
var _b = __read(_a, 2),
|
|
32
|
+
value = _b[1];
|
|
33
|
+
return value !== undefined;
|
|
34
|
+
}));
|
|
35
|
+
};
|
|
36
|
+
exports.removeUndefined = removeUndefined;
|