@catladder/cli 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/bundles/catenv/index.js +3 -3
- package/dist/bundles/cli/index.js +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandCloudSqlProxy.js +22 -19
- package/dist/cli/src/apps/cli/commands/project/commandCloudSqlProxy.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandOpenDashboard.js +10 -9
- package/dist/cli/src/apps/cli/commands/project/commandOpenDashboard.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandPortForward.js +18 -16
- package/dist/cli/src/apps/cli/commands/project/commandPortForward.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupCloudRun.js +10 -9
- package/dist/cli/src/apps/cli/commands/project/setup/setupCloudRun.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupContext.js +9 -8
- package/dist/cli/src/apps/cli/commands/project/setup/setupContext.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupKubernetes.js +23 -22
- package/dist/cli/src/apps/cli/commands/project/setup/setupKubernetes.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/utils/ensureCluster.js +10 -9
- package/dist/cli/src/apps/cli/commands/project/utils/ensureCluster.js.map +1 -1
- package/dist/cli/src/gcloud/cloudRun/openCloudRunDashboards.js +6 -5
- package/dist/cli/src/gcloud/cloudRun/openCloudRunDashboards.js.map +1 -1
- package/dist/cli/src/kubernetes/openKubernetesDashboards.js +10 -8
- package/dist/cli/src/kubernetes/openKubernetesDashboards.js.map +1 -1
- package/dist/pipeline/src/build/base/createAppBuildJob.js +8 -6
- package/dist/pipeline/src/build/base/createAppBuildJob.js.map +1 -1
- package/dist/pipeline/src/build/base/writeBuildInfo.js +1 -1
- package/dist/pipeline/src/build/base/writeBuildInfo.js.map +1 -1
- package/dist/pipeline/src/build/base/writeDotEnv.js +1 -1
- package/dist/pipeline/src/build/base/writeDotEnv.js.map +1 -1
- package/dist/pipeline/src/build/custom/buildJob.js +6 -6
- package/dist/pipeline/src/build/custom/buildJob.js.map +1 -1
- package/dist/pipeline/src/build/custom/testJob.js +5 -5
- package/dist/pipeline/src/build/custom/testJob.js.map +1 -1
- package/dist/pipeline/src/build/docker.d.ts +26 -5
- package/dist/pipeline/src/build/docker.js +50 -17
- package/dist/pipeline/src/build/docker.js.map +1 -1
- package/dist/pipeline/src/build/node/buildJob.js +11 -11
- package/dist/pipeline/src/build/node/buildJob.js.map +1 -1
- package/dist/pipeline/src/build/node/cache.js +1 -1
- package/dist/pipeline/src/build/node/cache.js.map +1 -1
- package/dist/pipeline/src/build/node/meteor.js +10 -10
- package/dist/pipeline/src/build/node/meteor.js.map +1 -1
- package/dist/pipeline/src/build/node/testJob.js +12 -12
- package/dist/pipeline/src/build/node/testJob.js.map +1 -1
- package/dist/pipeline/src/build/rails/build.js +3 -3
- package/dist/pipeline/src/build/rails/build.js.map +1 -1
- package/dist/pipeline/src/build/rails/test.js +4 -4
- package/dist/pipeline/src/build/rails/test.js.map +1 -1
- package/dist/pipeline/src/build/sbom.js +3 -3
- package/dist/pipeline/src/build/sbom.js.map +1 -1
- package/dist/pipeline/src/build/types.d.ts +33 -25
- package/dist/pipeline/src/build/types.js.map +1 -1
- package/dist/pipeline/src/context/getLabels.js +1 -1
- package/dist/pipeline/src/context/getLabels.js.map +1 -1
- package/dist/pipeline/src/context/index.js +37 -15
- package/dist/pipeline/src/context/index.js.map +1 -1
- package/dist/pipeline/src/deploy/base/deploy.js +10 -17
- package/dist/pipeline/src/deploy/base/deploy.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/artifactsRegistry.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/artifactsRegistry.js +8 -9
- package/dist/pipeline/src/deploy/cloudRun/artifactsRegistry.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/cloudRunRevisions.js +4 -5
- package/dist/pipeline/src/deploy/cloudRun/cloudRunRevisions.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/common.d.ts +4 -4
- package/dist/pipeline/src/deploy/cloudRun/createJobs/common.js +2 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/common.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/index.js +2 -4
- package/dist/pipeline/src/deploy/cloudRun/createJobs/index.js.map +1 -1
- package/dist/pipeline/src/deploy/custom/deployJob.js +7 -10
- package/dist/pipeline/src/deploy/custom/deployJob.js.map +1 -1
- package/dist/pipeline/src/deploy/dockerTag/deployJob.js +3 -5
- package/dist/pipeline/src/deploy/dockerTag/deployJob.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.js +11 -9
- package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/deployJob.js +3 -6
- package/dist/pipeline/src/deploy/kubernetes/deployJob.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/kubeEnv.js +2 -1
- package/dist/pipeline/src/deploy/kubernetes/kubeEnv.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.js +6 -6
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/mongodb.js +11 -11
- package/dist/pipeline/src/deploy/kubernetes/mongodb.js.map +1 -1
- package/dist/pipeline/src/deploy/sbom.js +1 -2
- package/dist/pipeline/src/deploy/sbom.js.map +1 -1
- package/dist/pipeline/src/deploy/types/index.d.ts +1 -1
- package/dist/pipeline/src/deploy/types/index.js +1 -1
- package/dist/pipeline/src/deploy/types/index.js.map +1 -1
- package/dist/pipeline/src/deploy/utils.js +2 -1
- package/dist/pipeline/src/deploy/utils.js.map +1 -1
- package/dist/pipeline/src/pipeline/createJobsForComponent.js +6 -8
- package/dist/pipeline/src/pipeline/createJobsForComponent.js.map +1 -1
- package/dist/pipeline/src/pipeline/generatePipelineFiles.js +36 -9
- package/dist/pipeline/src/pipeline/generatePipelineFiles.js.map +1 -1
- package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.js +2 -8
- package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.js.map +1 -1
- package/dist/pipeline/src/pipeline/gitlab/sortGitLabJobDefProps.d.ts +7 -0
- package/dist/pipeline/src/pipeline/gitlab/sortGitLabJobDefProps.js +59 -0
- package/dist/pipeline/src/pipeline/gitlab/sortGitLabJobDefProps.js.map +1 -0
- package/dist/pipeline/src/types/config.d.ts +1 -1
- package/dist/pipeline/src/types/context.d.ts +13 -1
- package/dist/pipeline/src/utils/removeUndefined.d.ts +1 -0
- package/dist/pipeline/src/utils/removeUndefined.js +27 -0
- package/dist/pipeline/src/utils/removeUndefined.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/apps/cli/commands/project/commandCloudSqlProxy.ts +6 -9
- package/src/apps/cli/commands/project/commandOpenDashboard.ts +2 -2
- package/src/apps/cli/commands/project/commandPortForward.ts +4 -4
- package/src/apps/cli/commands/project/setup/setupCloudRun.ts +2 -2
- package/src/apps/cli/commands/project/setup/setupContext.ts +2 -2
- package/src/apps/cli/commands/project/setup/setupKubernetes.ts +1 -1
- package/src/apps/cli/commands/project/utils/ensureCluster.ts +2 -4
- package/src/gcloud/cloudRun/openCloudRunDashboards.ts +2 -2
- package/src/kubernetes/openKubernetesDashboards.ts +2 -2
package/package.json
CHANGED
|
@@ -38,11 +38,9 @@ export default async (vorpal: Vorpal) =>
|
|
|
38
38
|
"⚠️ connection string does not include mr information on review environments",
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
|
-
if (isOfDeployType(context.
|
|
41
|
+
if (isOfDeployType(context.deploy?.config, "kubernetes")) {
|
|
42
42
|
proxyInfo = await getProxyInfoForKubernetes(this, context);
|
|
43
|
-
} else if (
|
|
44
|
-
isOfDeployType(context.componentConfig.deploy, "google-cloudrun")
|
|
45
|
-
) {
|
|
43
|
+
} else if (isOfDeployType(context.deploy?.config, "google-cloudrun")) {
|
|
46
44
|
proxyInfo = await getProxyInfoForCloudRun(this, context);
|
|
47
45
|
} else {
|
|
48
46
|
throw new Error("unsupported environment");
|
|
@@ -81,7 +79,7 @@ const getProxyInfoForKubernetes = async (
|
|
|
81
79
|
vorpal: CommandInstance,
|
|
82
80
|
context: ComponentContext,
|
|
83
81
|
): Promise<ProxyInfo> => {
|
|
84
|
-
if (!isOfDeployType(context.
|
|
82
|
+
if (!isOfDeployType(context.deploy?.config, "kubernetes")) {
|
|
85
83
|
throw new Error("unsupported");
|
|
86
84
|
}
|
|
87
85
|
|
|
@@ -112,8 +110,8 @@ const getProxyInfoForCloudRun = async (
|
|
|
112
110
|
context: ComponentContext,
|
|
113
111
|
): Promise<ProxyInfo> => {
|
|
114
112
|
if (
|
|
115
|
-
!isOfDeployType(context.
|
|
116
|
-
!context.
|
|
113
|
+
!isOfDeployType(context.deploy?.config, "google-cloudrun") ||
|
|
114
|
+
!context.deploy?.config.cloudSql
|
|
117
115
|
) {
|
|
118
116
|
throw new Error("unsupported");
|
|
119
117
|
}
|
|
@@ -130,8 +128,7 @@ const getProxyInfoForCloudRun = async (
|
|
|
130
128
|
const DB_NAME = context.environment.envVars.DB_NAME.toString();
|
|
131
129
|
|
|
132
130
|
return {
|
|
133
|
-
instanceName:
|
|
134
|
-
context.componentConfig.deploy.cloudSql.instanceConnectionName,
|
|
131
|
+
instanceName: context.deploy?.config.cloudSql.instanceConnectionName,
|
|
135
132
|
DB_PASSWORD,
|
|
136
133
|
DB_NAME,
|
|
137
134
|
DB_USER,
|
|
@@ -19,10 +19,10 @@ export default async (vorpal: Vorpal) =>
|
|
|
19
19
|
.action(async function ({ envComponent }) {
|
|
20
20
|
const { env, componentName } = parseChoice(envComponent);
|
|
21
21
|
const context = await getPipelineContextByChoice(env, componentName);
|
|
22
|
-
if (isOfDeployType(context.
|
|
22
|
+
if (isOfDeployType(context.deploy?.config, "kubernetes")) {
|
|
23
23
|
await openGoogleCloudKubernetesDashboard(this, context);
|
|
24
24
|
}
|
|
25
|
-
if (isOfDeployType(context.
|
|
25
|
+
if (isOfDeployType(context.deploy?.config, "google-cloudrun")) {
|
|
26
26
|
await openGoogleCloudRunDashboard(this, context);
|
|
27
27
|
}
|
|
28
28
|
});
|
|
@@ -48,7 +48,7 @@ const cloudRunPortForward = async (
|
|
|
48
48
|
cmd: CommandInstance,
|
|
49
49
|
context: ComponentContext,
|
|
50
50
|
) => {
|
|
51
|
-
if (!isOfDeployType(context.
|
|
51
|
+
if (!isOfDeployType(context.deploy?.config, "google-cloudrun")) {
|
|
52
52
|
throw new Error("not cloud run");
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -67,7 +67,7 @@ const cloudRunPortForward = async (
|
|
|
67
67
|
.replace("-review-", "-review-mr" + mr + "-");
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
const { projectId, region } = context.
|
|
70
|
+
const { projectId, region } = context.deploy.config;
|
|
71
71
|
|
|
72
72
|
const command = `gcloud beta run services proxy ${serviceName} --project ${projectId} --region ${region}`;
|
|
73
73
|
|
|
@@ -82,10 +82,10 @@ export default async (vorpal: Vorpal) =>
|
|
|
82
82
|
const { env, componentName } = parseChoice(envComponent);
|
|
83
83
|
const context = await getPipelineContextByChoice(env, componentName);
|
|
84
84
|
|
|
85
|
-
if (isOfDeployType(context.
|
|
85
|
+
if (isOfDeployType(context.deploy?.config, "kubernetes")) {
|
|
86
86
|
await kubePortForward(this, envComponent);
|
|
87
87
|
}
|
|
88
|
-
if (isOfDeployType(context.
|
|
88
|
+
if (isOfDeployType(context.deploy?.config, "google-cloudrun")) {
|
|
89
89
|
await cloudRunPortForward(this, context);
|
|
90
90
|
}
|
|
91
91
|
});
|
|
@@ -16,11 +16,11 @@ export const setupCloudRun = async (
|
|
|
16
16
|
instance: CommandInstance,
|
|
17
17
|
context: ComponentContext,
|
|
18
18
|
) => {
|
|
19
|
-
if (!isOfDeployType(context.
|
|
19
|
+
if (!isOfDeployType(context.deploy?.config, "google-cloudrun")) {
|
|
20
20
|
throw new Error("deploy config is not of type 'google-cloudrun'");
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
const config = context.
|
|
23
|
+
const config = context.deploy?.config;
|
|
24
24
|
|
|
25
25
|
// enable services
|
|
26
26
|
|
|
@@ -22,11 +22,11 @@ export const setupContext = async (
|
|
|
22
22
|
"...",
|
|
23
23
|
);
|
|
24
24
|
instance.log("");
|
|
25
|
-
if (isOfDeployType(context.
|
|
25
|
+
if (isOfDeployType(context.deploy?.config, "google-cloudrun")) {
|
|
26
26
|
await setupCloudRun(instance, context);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
const deployConfig = context.
|
|
29
|
+
const deployConfig = context.deploy?.config;
|
|
30
30
|
if (isOfDeployType(deployConfig, "kubernetes")) {
|
|
31
31
|
await setupKubernetes(instance, context);
|
|
32
32
|
}
|
|
@@ -17,7 +17,7 @@ export const setupKubernetes = async (
|
|
|
17
17
|
instance: CommandInstance,
|
|
18
18
|
context: ComponentContext,
|
|
19
19
|
) => {
|
|
20
|
-
const deployConfig = context.
|
|
20
|
+
const deployConfig = context.deploy?.config;
|
|
21
21
|
if (!isOfDeployType(deployConfig, "kubernetes")) {
|
|
22
22
|
throw new Error("cannot run setupKubernetes on non-kubernetes deployments");
|
|
23
23
|
}
|
|
@@ -13,12 +13,10 @@ import {
|
|
|
13
13
|
export default async function (envComponent: string) {
|
|
14
14
|
const { env, componentName } = parseChoice(envComponent);
|
|
15
15
|
const context = await getPipelineContextByChoice(env, componentName);
|
|
16
|
-
if (!isOfDeployType(context.
|
|
16
|
+
if (!isOfDeployType(context.deploy?.config, "kubernetes")) {
|
|
17
17
|
throw new Error("can't ensure cluster for non-kubernetes deployments");
|
|
18
18
|
}
|
|
19
|
-
const cluster = getFullKubernetesClusterName(
|
|
20
|
-
context.componentConfig.deploy.cluster,
|
|
21
|
-
);
|
|
19
|
+
const cluster = getFullKubernetesClusterName(context.deploy?.config.cluster);
|
|
22
20
|
const connectedClusterName = await getCurrentConnectedClusterName();
|
|
23
21
|
|
|
24
22
|
if (cluster !== connectedClusterName) {
|
|
@@ -7,11 +7,11 @@ export const openGoogleCloudRunDashboard = async (
|
|
|
7
7
|
instance: CommandInstance,
|
|
8
8
|
context: ComponentContext,
|
|
9
9
|
) => {
|
|
10
|
-
if (!isOfDeployType(context.
|
|
10
|
+
if (!isOfDeployType(context.deploy?.config, "google-cloudrun")) {
|
|
11
11
|
throw new Error("deploy type is not google-cloudrun ");
|
|
12
12
|
}
|
|
13
13
|
const { fullName } = context.environment;
|
|
14
|
-
const { region, projectId } = context.
|
|
14
|
+
const { region, projectId } = context.deploy.config;
|
|
15
15
|
await openGoogleCloudDashboard(
|
|
16
16
|
instance,
|
|
17
17
|
`run/detail/${region}/${fullName}/metrics`,
|
|
@@ -7,7 +7,7 @@ export const openGoogleCloudLogs = async (
|
|
|
7
7
|
instance: CommandInstance,
|
|
8
8
|
context: ComponentContext,
|
|
9
9
|
) => {
|
|
10
|
-
const deployConfig = context.
|
|
10
|
+
const deployConfig = context.deploy?.config;
|
|
11
11
|
if (!isOfDeployType(deployConfig, "kubernetes")) {
|
|
12
12
|
throw new Error("context is not of type kubernetes");
|
|
13
13
|
}
|
|
@@ -33,7 +33,7 @@ export const openGoogleCloudKubernetesDashboard = async (
|
|
|
33
33
|
instance: CommandInstance,
|
|
34
34
|
context: ComponentContext,
|
|
35
35
|
) => {
|
|
36
|
-
const deployConfig = context.
|
|
36
|
+
const deployConfig = context.deploy?.config;
|
|
37
37
|
if (!isOfDeployType(deployConfig, "kubernetes")) {
|
|
38
38
|
throw new Error("context is not of type kubernetes");
|
|
39
39
|
}
|