@catladder/cli 1.152.0 → 1.153.1
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 +1 -1
- package/dist/bundles/cli/index.js +1 -1
- package/dist/cli/src/apps/cli/commands/project/cloudSql/commandProjectRestoreDb.js +2 -2
- package/dist/cli/src/apps/cli/commands/project/cloudSql/commandProjectRestoreDb.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandCloudSqlProxy.js +2 -2
- package/dist/cli/src/apps/cli/commands/project/commandCloudSqlProxy.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupCloudRun.js +1 -1
- 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 +2 -10
- 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 +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupKubernetes.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/utils/ensureNamespace.js +2 -2
- package/dist/cli/src/apps/cli/commands/project/utils/ensureNamespace.js.map +1 -1
- package/dist/cli/src/gcloud/serviceAccounts.js +3 -3
- package/dist/cli/src/gcloud/serviceAccounts.js.map +1 -1
- package/dist/pipeline/src/build/base/createAppBuildJob.js +4 -5
- package/dist/pipeline/src/build/base/createAppBuildJob.js.map +1 -1
- package/dist/pipeline/src/build/docker.js +1 -1
- package/dist/pipeline/src/build/docker.js.map +1 -1
- package/dist/pipeline/src/context/getEnvironmentVariables.js +1 -3
- package/dist/pipeline/src/context/getEnvironmentVariables.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/deploy/cloudRun/artifactsRegistry.js +1 -1
- package/dist/pipeline/src/deploy/cloudRun/artifactsRegistry.js.map +1 -1
- package/dist/pipeline/src/types/context.d.ts +3 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/apps/cli/commands/project/cloudSql/commandProjectRestoreDb.ts +2 -2
- package/src/apps/cli/commands/project/commandCloudSqlProxy.ts +2 -2
- package/src/apps/cli/commands/project/setup/setupCloudRun.ts +1 -1
- package/src/apps/cli/commands/project/setup/setupContext.ts +2 -12
- package/src/apps/cli/commands/project/setup/setupKubernetes.ts +1 -1
- package/src/apps/cli/commands/project/utils/ensureNamespace.ts +2 -5
- package/src/gcloud/serviceAccounts.ts +3 -3
package/package.json
CHANGED
|
@@ -36,7 +36,7 @@ export default async (vorpal: Vorpal) =>
|
|
|
36
36
|
|
|
37
37
|
const sourceEnvVars = await getEnvVarsResolved(
|
|
38
38
|
this,
|
|
39
|
-
sourceContext.
|
|
39
|
+
sourceContext.env,
|
|
40
40
|
sourceContext.componentName,
|
|
41
41
|
);
|
|
42
42
|
|
|
@@ -99,7 +99,7 @@ export default async (vorpal: Vorpal) =>
|
|
|
99
99
|
|
|
100
100
|
const targetEnvVars = await getEnvVarsResolved(
|
|
101
101
|
this,
|
|
102
|
-
targetContext.
|
|
102
|
+
targetContext.env,
|
|
103
103
|
targetContext.componentName,
|
|
104
104
|
);
|
|
105
105
|
|
|
@@ -85,7 +85,7 @@ const getProxyInfoForKubernetes = async (
|
|
|
85
85
|
|
|
86
86
|
const envVars = await getEnvVarsResolved(
|
|
87
87
|
vorpal,
|
|
88
|
-
context.
|
|
88
|
+
context.env,
|
|
89
89
|
context.componentName,
|
|
90
90
|
);
|
|
91
91
|
// bit hacky, would be nicer if we would also declare this through env vars
|
|
@@ -118,7 +118,7 @@ const getProxyInfoForCloudRun = async (
|
|
|
118
118
|
|
|
119
119
|
const envVars = await getEnvVarsResolved(
|
|
120
120
|
vorpal,
|
|
121
|
-
context.
|
|
121
|
+
context.env,
|
|
122
122
|
context.componentName,
|
|
123
123
|
);
|
|
124
124
|
|
|
@@ -15,11 +15,7 @@ export const setupContext = async (
|
|
|
15
15
|
);
|
|
16
16
|
|
|
17
17
|
instance.log(
|
|
18
|
-
"🐱 🔧 setting up " +
|
|
19
|
-
context.environment.shortName +
|
|
20
|
-
":" +
|
|
21
|
-
context.componentName +
|
|
22
|
-
"...",
|
|
18
|
+
"🐱 🔧 setting up " + context.env + ":" + context.componentName + "...",
|
|
23
19
|
);
|
|
24
20
|
instance.log("");
|
|
25
21
|
if (isOfDeployType(context.deploy?.config, "google-cloudrun")) {
|
|
@@ -32,13 +28,7 @@ export const setupContext = async (
|
|
|
32
28
|
}
|
|
33
29
|
|
|
34
30
|
instance.log("");
|
|
35
|
-
instance.log(
|
|
36
|
-
"✅ " +
|
|
37
|
-
context.environment.shortName +
|
|
38
|
-
":" +
|
|
39
|
-
context.componentName +
|
|
40
|
-
" done!",
|
|
41
|
-
);
|
|
31
|
+
instance.log("✅ " + context.env + ":" + context.componentName + " done!");
|
|
42
32
|
|
|
43
33
|
instance.log("");
|
|
44
34
|
};
|
|
@@ -5,17 +5,14 @@ import { V1Namespace } from "@kubernetes/client-node";
|
|
|
5
5
|
import { getk8sApi } from "../../../../../k8sApi";
|
|
6
6
|
|
|
7
7
|
export default async function (context: ComponentContext) {
|
|
8
|
-
const namespace = getKubernetesNamespace(
|
|
9
|
-
context.fullConfig,
|
|
10
|
-
context.environment.shortName,
|
|
11
|
-
);
|
|
8
|
+
const namespace = getKubernetesNamespace(context.fullConfig, context.env);
|
|
12
9
|
const namespaceBody = new V1Namespace();
|
|
13
10
|
const metadata: V1ObjectMeta = {
|
|
14
11
|
name: namespace,
|
|
15
12
|
labels: {
|
|
16
13
|
customerName: context.fullConfig.customerName,
|
|
17
14
|
appName: context.fullConfig.appName,
|
|
18
|
-
environment: context.
|
|
15
|
+
environment: context.env,
|
|
19
16
|
components: Object.keys(context.fullConfig.components).join("_"), // limited chars available...
|
|
20
17
|
buildTypes: Object.values(context.fullConfig.components)
|
|
21
18
|
.map((config) => config.build.type)
|
|
@@ -29,7 +29,7 @@ const upsertGcloudServiceAccount = async (
|
|
|
29
29
|
|
|
30
30
|
// name has limit of 30
|
|
31
31
|
const namePrefix = `${name}`;
|
|
32
|
-
const nameSuffixRaw = `${context.
|
|
32
|
+
const nameSuffixRaw = `${context.env}-${context.componentName}`;
|
|
33
33
|
const nameMiddleRaw = `${context.fullConfig.customerName}-${context.fullConfig.appName}`;
|
|
34
34
|
const MAX_LENGTH = 30;
|
|
35
35
|
const NUM_SEPARATORS = 2;
|
|
@@ -55,7 +55,7 @@ const upsertGcloudServiceAccount = async (
|
|
|
55
55
|
|
|
56
56
|
const fullName = `${namePrefix}-${nameMiddle}-${nameSuffix}`;
|
|
57
57
|
|
|
58
|
-
const fullDisplayName = `${context.fullConfig.customerName}-${context.fullConfig.appName} ${context.
|
|
58
|
+
const fullDisplayName = `${context.fullConfig.customerName}-${context.fullConfig.appName} ${context.env}:${context.componentName} | ${displayName}`;
|
|
59
59
|
|
|
60
60
|
const fullIdentifier = `${fullName}@${projectId}.iam.gserviceaccount.com`;
|
|
61
61
|
|
|
@@ -106,7 +106,7 @@ export const upsertGcloudServiceAccountAndSaveSecret = async (
|
|
|
106
106
|
{
|
|
107
107
|
[secretName]: key,
|
|
108
108
|
},
|
|
109
|
-
context.
|
|
109
|
+
context.env,
|
|
110
110
|
context.componentName,
|
|
111
111
|
);
|
|
112
112
|
instance.log("done!");
|