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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kubiy-paas-cli",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "description": "CLI para la plataforma PaaS de Kubiy",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -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
- logInfo("Notificando a Kubiy que inicie el deploy...");
501
-
502
- const deployResp = await apiPost("/deploys", {
503
- deployId,
504
- appId,
505
- serviceId,
506
- artifactKey: key,
507
- commit,
508
- env: environment?.name
509
- }, {
510
- headers: {
511
- "x-kubiy-token": apikey
512
- }
513
- });
514
-
515
- logSuccess("🚀 Deploy iniciado correctamente en Kubiy.");
516
- console.log(JSON.stringify(deployResp, null, 2));
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`);