@catladder/pipeline 1.43.0 → 1.44.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/docker.d.ts +28 -1
- package/dist/build/docker.js +25 -13
- package/dist/bundles/catladder-gitlab/index.js +3 -3
- package/dist/constants.js +1 -1
- package/dist/context/getLabels.d.ts +8 -0
- package/dist/context/getLabels.js +49 -0
- package/dist/context/index.js +3 -1
- package/dist/deploy/cloudRun/deployJob.d.ts +3 -0
- package/dist/deploy/cloudRun/deployJob.js +110 -0
- package/dist/deploy/cloudRun/index.d.ts +4 -0
- package/dist/deploy/cloudRun/index.js +18 -0
- package/dist/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.d.ts +2 -0
- package/dist/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.js +14 -0
- package/dist/deploy/index.d.ts +1 -0
- package/dist/deploy/index.js +6 -1
- package/dist/deploy/kubernetes/kubeValues.d.ts +8 -8
- package/dist/deploy/kubernetes/processSecretsAsFiles.d.ts +8 -8
- package/dist/deploy/types/base.d.ts +15 -0
- package/dist/deploy/types/base.js +3 -0
- package/dist/deploy/types/custom.d.ts +10 -0
- package/dist/deploy/types/custom.js +3 -0
- package/dist/deploy/types/googleCloudRun.d.ts +20 -0
- package/dist/deploy/types/googleCloudRun.js +3 -0
- package/dist/deploy/types/index.d.ts +18 -0
- package/dist/deploy/types/index.js +39 -0
- package/dist/deploy/{types.d.ts → types/kubernetes.d.ts} +1 -34
- package/dist/deploy/types/kubernetes.js +3 -0
- package/dist/runner/index.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/build/docker.ts +21 -15
- package/src/context/getLabels.ts +20 -0
- package/src/context/index.ts +15 -2
- package/src/deploy/cloudRun/deployJob.ts +84 -0
- package/src/deploy/cloudRun/index.ts +12 -0
- package/src/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.ts +14 -0
- package/src/deploy/index.ts +3 -0
- package/src/deploy/types/base.ts +17 -0
- package/src/deploy/types/custom.ts +11 -0
- package/src/deploy/types/googleCloudRun.ts +55 -0
- package/src/deploy/types/index.ts +25 -0
- package/src/deploy/{types.ts → types/kubernetes.ts} +1 -43
- package/src/deploy/utils.ts +1 -1
- package/src/runner/index.ts +1 -0
- package/dist/deploy/types.js +0 -16
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { DeployConfigCustom } from "./custom";
|
|
2
|
+
import type { DeployConfigCloudRun } from "./googleCloudRun";
|
|
3
|
+
import type { DeployConfigKubernetes } from "./kubernetes";
|
|
4
|
+
|
|
5
|
+
export * from "./custom";
|
|
6
|
+
export * from "./googleCloudRun";
|
|
7
|
+
export * from "./kubernetes";
|
|
8
|
+
|
|
9
|
+
export type DeployConfig =
|
|
10
|
+
| DeployConfigKubernetes
|
|
11
|
+
| DeployConfigCustom
|
|
12
|
+
| DeployConfigCloudRun;
|
|
13
|
+
|
|
14
|
+
export type DeployConfigType = DeployConfig["type"];
|
|
15
|
+
export type DeployConfigGeneric<T extends DeployConfigType> = Extract<
|
|
16
|
+
DeployConfig,
|
|
17
|
+
{ type: T }
|
|
18
|
+
>;
|
|
19
|
+
|
|
20
|
+
export const isOfDeployType = <T extends Array<DeployConfigType>>(
|
|
21
|
+
t: DeployConfig | false,
|
|
22
|
+
...types: T
|
|
23
|
+
): t is Extract<DeployConfig, { type: T[number] }> => {
|
|
24
|
+
return t && types.includes(t.type);
|
|
25
|
+
};
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
4
|
-
export type DeployConfigBase = {
|
|
5
|
-
/**
|
|
6
|
-
* whether to deploy automatically or manual. If not defined, these rules apply:
|
|
7
|
-
* - prod: manual
|
|
8
|
-
* - all other envs: auto
|
|
9
|
-
*/
|
|
10
|
-
when?: "manual" | "auto";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* EXPERIMENTAL
|
|
14
|
-
* wait for other components to deploy first, before doing this deployment
|
|
15
|
-
*/
|
|
16
|
-
waitFor?: string[];
|
|
17
|
-
};
|
|
18
|
-
type AllowUnknownProps<T extends Record<string, unknown>> = T &
|
|
19
|
-
Record<string, unknown>;
|
|
1
|
+
import type { AllowUnknownProps, DeployConfigBase } from "./base";
|
|
20
2
|
|
|
21
3
|
export type DeployConfigKubernetesClusterGCloud = {
|
|
22
4
|
type: "gcloud";
|
|
@@ -297,27 +279,3 @@ export type DeployConfigKubernetes = {
|
|
|
297
279
|
*/
|
|
298
280
|
values?: DeployConfigKubernetesValues;
|
|
299
281
|
} & DeployConfigBase;
|
|
300
|
-
|
|
301
|
-
export type DeployConfigCustom = {
|
|
302
|
-
type: "custom";
|
|
303
|
-
requiresDocker: boolean;
|
|
304
|
-
requiresYarnInstall?: boolean;
|
|
305
|
-
script: string[];
|
|
306
|
-
stopScript?: string[];
|
|
307
|
-
image?: RunnerImageName;
|
|
308
|
-
} & DeployConfigBase;
|
|
309
|
-
|
|
310
|
-
export type DeployConfig = DeployConfigKubernetes | DeployConfigCustom;
|
|
311
|
-
|
|
312
|
-
export type DeployConfigType = DeployConfig["type"];
|
|
313
|
-
export type DeployConfigGeneric<T extends DeployConfigType> = Extract<
|
|
314
|
-
DeployConfig,
|
|
315
|
-
{ type: T }
|
|
316
|
-
>;
|
|
317
|
-
|
|
318
|
-
export const isOfDeployType = <T extends Array<DeployConfigType>>(
|
|
319
|
-
t: DeployConfig | false,
|
|
320
|
-
...types: T
|
|
321
|
-
): t is Extract<DeployConfig, { type: T[number] }> => {
|
|
322
|
-
return t && types.includes(t.type);
|
|
323
|
-
};
|
package/src/deploy/utils.ts
CHANGED
package/src/runner/index.ts
CHANGED
package/dist/deploy/types.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.isOfDeployType = void 0;
|
|
5
|
-
|
|
6
|
-
var isOfDeployType = function (t) {
|
|
7
|
-
var types = [];
|
|
8
|
-
|
|
9
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
10
|
-
types[_i - 1] = arguments[_i];
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
return t && types.includes(t.type);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
exports.isOfDeployType = isOfDeployType;
|