underpost 2.8.651 → 2.8.652
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/README.md +1 -2
- package/bin/file.js +2 -4
- package/cli.md +1 -1
- package/docker-compose.yml +1 -1
- package/package.json +1 -1
- package/src/cli/deploy.js +5 -2
- package/src/cli/monitor.js +11 -8
- package/src/index.js +1 -1
package/README.md
CHANGED
|
@@ -68,7 +68,7 @@ Run dev client server
|
|
|
68
68
|
npm run dev
|
|
69
69
|
```
|
|
70
70
|
<!-- -->
|
|
71
|
-
## underpost ci/cd cli v2.8.
|
|
71
|
+
## underpost ci/cd cli v2.8.652
|
|
72
72
|
|
|
73
73
|
### Usage: `underpost [options] [command]`
|
|
74
74
|
```
|
|
@@ -104,4 +104,3 @@ Commands:
|
|
|
104
104
|
|
|
105
105
|
<a target="_top" href="https://github.com/underpostnet/pwa-microservices-template/blob/master/cli.md">See complete CLI Docs here.</a>
|
|
106
106
|
|
|
107
|
-
|
package/bin/file.js
CHANGED
|
@@ -139,12 +139,10 @@ try {
|
|
|
139
139
|
const splitKeyword = '## underpost ci/cd cli';
|
|
140
140
|
fs.writeFileSync(
|
|
141
141
|
`../pwa-microservices-template/README.md`,
|
|
142
|
-
fs.readFileSync(`../pwa-microservices-template/README.md`, 'utf8').
|
|
143
|
-
`<!-- -->`,
|
|
142
|
+
fs.readFileSync(`../pwa-microservices-template/README.md`, 'utf8').split(`<!-- -->`)[0] +
|
|
144
143
|
`<!-- -->
|
|
145
144
|
${splitKeyword + fs.readFileSync(`./README.md`, 'utf8').split(splitKeyword)[1]}`,
|
|
146
|
-
|
|
147
|
-
),
|
|
145
|
+
'utf8',
|
|
148
146
|
);
|
|
149
147
|
}
|
|
150
148
|
|
package/cli.md
CHANGED
package/docker-compose.yml
CHANGED
package/package.json
CHANGED
package/src/cli/deploy.js
CHANGED
|
@@ -275,8 +275,11 @@ kubectl scale statefulsets <stateful-set-name> --replicas=<new-replicas>
|
|
|
275
275
|
shellExec(`sudo kubectl port-forward -n default svc/${svc.NAME} ${port}:${port}`, { async: true });
|
|
276
276
|
continue;
|
|
277
277
|
}
|
|
278
|
-
|
|
279
|
-
|
|
278
|
+
|
|
279
|
+
for (const version of options.versions.split(',')) {
|
|
280
|
+
shellExec(`sudo kubectl delete svc ${deployId}-${env}-${version}-service`);
|
|
281
|
+
shellExec(`sudo kubectl delete deployment ${deployId}-${env}-${version}`);
|
|
282
|
+
}
|
|
280
283
|
|
|
281
284
|
const confServer = JSON.parse(fs.readFileSync(`./engine-private/conf/${deployId}/conf.server.json`, 'utf8'));
|
|
282
285
|
for (const host of Object.keys(confServer)) {
|
package/src/cli/monitor.js
CHANGED
|
@@ -141,14 +141,17 @@ class UnderpostMonitor {
|
|
|
141
141
|
}
|
|
142
142
|
const cmd = `underpost config get container-status`;
|
|
143
143
|
const checkDeploymentReadyStatus = () => {
|
|
144
|
-
const
|
|
145
|
-
if (
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
144
|
+
const pods = UnderpostDeploy.API.get(`${deployId}-${env}-${traffic}`);
|
|
145
|
+
if (pods && pods[0]) {
|
|
146
|
+
const { NAME } = pods[0];
|
|
147
|
+
if (
|
|
148
|
+
shellExec(`sudo kubectl exec -i ${NAME} -- sh -c "${cmd}"`, { stdout: true }).match(
|
|
149
|
+
`${deployId}-${env}-running-deployment`,
|
|
150
|
+
)
|
|
151
|
+
) {
|
|
152
|
+
monitorPodName = NAME;
|
|
153
|
+
monitorTrafficName = `${traffic}`;
|
|
154
|
+
}
|
|
152
155
|
}
|
|
153
156
|
};
|
|
154
157
|
if (!monitorPodName) {
|