kubiy-paas-cli 0.1.20 → 0.1.21
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/package.json +1 -1
- package/src/commands/deploy.js +25 -18
package/package.json
CHANGED
package/src/commands/deploy.js
CHANGED
|
@@ -471,7 +471,7 @@ async function run(args = []) {
|
|
|
471
471
|
}
|
|
472
472
|
});
|
|
473
473
|
|
|
474
|
-
logInfo(JSON.stringify(presignResp, null, 2));
|
|
474
|
+
//logInfo(JSON.stringify(presignResp, null, 2));
|
|
475
475
|
const { deployId, releaseId } = presignResp || {};
|
|
476
476
|
if (!deployId || !releaseId) {
|
|
477
477
|
throw new Error(
|
|
@@ -497,23 +497,30 @@ async function run(args = []) {
|
|
|
497
497
|
logSuccess("Artefacto subido correctamente a S3.");
|
|
498
498
|
|
|
499
499
|
// 7) Avisar a Kubiy que inicie el deploy (POST /deploys)
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
500
|
+
// En deploys static no se llama a /deploys: la subida del artefacto al
|
|
501
|
+
// bucket presignado es suficiente para que el backend publique el sitio.
|
|
502
|
+
if (opts.static) {
|
|
503
|
+
logSuccess("🚀 Deploy static publicado correctamente en Kubiy.");
|
|
504
|
+
logInfo(`deployId=${deployId} releaseId=${releaseId}`);
|
|
505
|
+
} else {
|
|
506
|
+
logInfo("Notificando a Kubiy que inicie el deploy...");
|
|
507
|
+
|
|
508
|
+
const deployResp = await apiPost("/deploys", {
|
|
509
|
+
deployId,
|
|
510
|
+
appId,
|
|
511
|
+
serviceId,
|
|
512
|
+
artifactKey: key,
|
|
513
|
+
commit,
|
|
514
|
+
env: environment?.name
|
|
515
|
+
}, {
|
|
516
|
+
headers: {
|
|
517
|
+
"x-kubiy-token": apikey
|
|
518
|
+
}
|
|
519
|
+
});
|
|
520
|
+
|
|
521
|
+
logSuccess("🚀 Deploy iniciado correctamente en Kubiy.");
|
|
522
|
+
console.log(JSON.stringify(deployResp, null, 2));
|
|
523
|
+
}
|
|
517
524
|
|
|
518
525
|
logInfo(`Puedes consultar el servicio con: kubiy service:get ${serviceId}`);
|
|
519
526
|
logInfo(`Y los logs con: kubiy logs ${serviceId} --kind=deploy --lines=200`);
|