@catladder/pipeline 1.42.2 → 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.
Files changed (47) hide show
  1. package/dist/build/docker.d.ts +28 -1
  2. package/dist/build/docker.js +25 -13
  3. package/dist/bundles/catladder-gitlab/index.js +3 -3
  4. package/dist/constants.js +1 -1
  5. package/dist/context/getLabels.d.ts +8 -0
  6. package/dist/context/getLabels.js +49 -0
  7. package/dist/context/index.js +3 -1
  8. package/dist/deploy/cloudRun/deployJob.d.ts +3 -0
  9. package/dist/deploy/cloudRun/deployJob.js +110 -0
  10. package/dist/deploy/cloudRun/index.d.ts +4 -0
  11. package/dist/deploy/cloudRun/index.js +18 -0
  12. package/dist/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.d.ts +2 -0
  13. package/dist/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.js +14 -0
  14. package/dist/deploy/custom/deployJob.js +2 -8
  15. package/dist/deploy/index.d.ts +1 -0
  16. package/dist/deploy/index.js +6 -1
  17. package/dist/deploy/kubernetes/kubeValues.d.ts +8 -8
  18. package/dist/deploy/kubernetes/processSecretsAsFiles.d.ts +8 -8
  19. package/dist/deploy/types/base.d.ts +15 -0
  20. package/dist/deploy/types/base.js +3 -0
  21. package/dist/deploy/types/custom.d.ts +10 -0
  22. package/dist/deploy/types/custom.js +3 -0
  23. package/dist/deploy/types/googleCloudRun.d.ts +20 -0
  24. package/dist/deploy/types/googleCloudRun.js +3 -0
  25. package/dist/deploy/types/index.d.ts +18 -0
  26. package/dist/deploy/types/index.js +39 -0
  27. package/dist/deploy/{types.d.ts → types/kubernetes.d.ts} +1 -33
  28. package/dist/deploy/types/kubernetes.js +3 -0
  29. package/dist/runner/index.d.ts +1 -1
  30. package/dist/tsconfig.tsbuildinfo +1 -1
  31. package/package.json +1 -1
  32. package/src/build/docker.ts +21 -15
  33. package/src/context/getLabels.ts +20 -0
  34. package/src/context/index.ts +15 -2
  35. package/src/deploy/cloudRun/deployJob.ts +84 -0
  36. package/src/deploy/cloudRun/index.ts +12 -0
  37. package/src/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.ts +14 -0
  38. package/src/deploy/custom/deployJob.ts +1 -15
  39. package/src/deploy/index.ts +3 -0
  40. package/src/deploy/types/base.ts +17 -0
  41. package/src/deploy/types/custom.ts +11 -0
  42. package/src/deploy/types/googleCloudRun.ts +55 -0
  43. package/src/deploy/types/index.ts +25 -0
  44. package/src/deploy/{types.ts → types/kubernetes.ts} +1 -42
  45. package/src/deploy/utils.ts +1 -1
  46. package/src/runner/index.ts +1 -0
  47. package/dist/deploy/types.js +0 -16
@@ -0,0 +1,55 @@
1
+ import type { DeployConfigBase } from "./base";
2
+
3
+ export type Gcloudregion =
4
+ | "asia-east1"
5
+ | "asia-northeast1"
6
+ | "asia-northeast2"
7
+ | "europe-north1"
8
+ | "europe-southwest1"
9
+ | "europe-west1"
10
+ | "europe-west4"
11
+ | "europe-west8"
12
+ | "europe-west9"
13
+ | "me-west1"
14
+ | "us-central1"
15
+ | "us-east1"
16
+ | "us-east4"
17
+ | "us-east5"
18
+ | "us-south1"
19
+ | "us-west1"
20
+ | "asia-east2"
21
+ | "asia-northeast3"
22
+ | "asia-southeast1"
23
+ | "asia-southeast2"
24
+ | "asia-south1"
25
+ | "asia-south2"
26
+ | "australia-southeast1"
27
+ | "australia-southeast2"
28
+ | "europe-central2"
29
+ | "europe-west2"
30
+ | "europe-west3"
31
+ | "europe-west6"
32
+ | "northamerica-northeast1"
33
+ | "northamerica-northeast2"
34
+ | "southamerica-east1"
35
+ | "southamerica-west1"
36
+ | "us-west2"
37
+ | "us-west3"
38
+ | "us-west4";
39
+
40
+ export type DeployConfigCloudRun = {
41
+ /**
42
+ * EXPERIMENTAL cloud run deployment.
43
+ *
44
+ * Requires that cloud run is enabled on the project, as well as cloud run api and artifacts registry.
45
+ */
46
+ type: "google-cloudrun";
47
+ /**
48
+ * the google cloud porject id
49
+ */
50
+ projectId: string;
51
+ /**
52
+ * the region. Set to europe-west6 for switzerland
53
+ */
54
+ region: Gcloudregion;
55
+ } & DeployConfigBase;
@@ -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 { RunnerImageName } from "../runner";
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,26 +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
- script: string[];
305
- stopScript?: string[];
306
- image?: RunnerImageName;
307
- } & DeployConfigBase;
308
-
309
- export type DeployConfig = DeployConfigKubernetes | DeployConfigCustom;
310
-
311
- export type DeployConfigType = DeployConfig["type"];
312
- export type DeployConfigGeneric<T extends DeployConfigType> = Extract<
313
- DeployConfig,
314
- { type: T }
315
- >;
316
-
317
- export const isOfDeployType = <T extends Array<DeployConfigType>>(
318
- t: DeployConfig | false,
319
- ...types: T
320
- ): t is Extract<DeployConfig, { type: T[number] }> => {
321
- return t && types.includes(t.type);
322
- };
@@ -1,5 +1,5 @@
1
1
  import type { Config, Context } from "../types";
2
- import type { DeployConfigKubernetesCluster} from "./types";
2
+ import type { DeployConfigKubernetesCluster } from "./types";
3
3
  import { isOfDeployType } from "./types";
4
4
 
5
5
  export const getFullKubernetesClusterName = (
@@ -7,6 +7,7 @@ export type RunnerImageName =
7
7
  | "kubernetes"
8
8
  | "base-pipeline"
9
9
  | "docker-build"
10
+ | "gcloud"
10
11
  | "semantic-release";
11
12
  export const getRunnerImage = (imageName: RunnerImageName) =>
12
13
  DOCKER_REGISTRY + "/" + imageName + ":" + PIPELINE_IMAGE_TAG;
@@ -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;