buildnator-personal 0.0.1 → 0.0.3
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/buildnator.client.ts +34 -1
- package/dist/buildnator.client.js +50 -1
- package/package.json +1 -1
package/buildnator.client.ts
CHANGED
|
@@ -313,7 +313,7 @@ export class BuildnatorClient {
|
|
|
313
313
|
async liberaAGBEspecifica(diretorio: string, baseline: string): Promise<any> {
|
|
314
314
|
await this.jenkinsPost(`${this.jobs.qaTaAgbLiberaEspecifica}/buildWithParameters`, {
|
|
315
315
|
diretorioExecutaveis: diretorio,
|
|
316
|
-
baseline,
|
|
316
|
+
baselineExecutaveis: baseline,
|
|
317
317
|
});
|
|
318
318
|
await this.sleep(this.buildDelayMs);
|
|
319
319
|
const numbuild = await this.jenkinsPost(`${this.jobs.qaTaAgbLiberaEspecifica}/api/json`);
|
|
@@ -437,4 +437,37 @@ export class BuildnatorClient {
|
|
|
437
437
|
return { terminado: true, resultado: false, tipo: "unificar", retorno: "erro interno" };
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
+
|
|
441
|
+
async verificarExecucaoLiberaVersao(projeto: any, tipo?: any) {
|
|
442
|
+
|
|
443
|
+
try {
|
|
444
|
+
|
|
445
|
+
if (tipo && tipo === "especifica" && projeto === "agrimanager") {
|
|
446
|
+
const numbuild = await this.jenkinsPost(`${this.jobs.qaAgmLiberaEspecifica}/api/json`);
|
|
447
|
+
const numbuildExecucao = await this.jenkinsPost(`${this.jobs.qaAgmLiberaEspecifica}/${numbuild.builds[0].number}/api/json`);
|
|
448
|
+
if (numbuildExecucao && numbuildExecucao.inProgress === false) {
|
|
449
|
+
return false;
|
|
450
|
+
}
|
|
451
|
+
return true;
|
|
452
|
+
} else {
|
|
453
|
+
if (projeto === "agrimanager") {
|
|
454
|
+
const numbuild = await this.jenkinsPost(`${this.jobs.qaAgmLibera}/api/json`);
|
|
455
|
+
const numbuildExecucao = await this.jenkinsPost(`${this.jobs.qaAgmLibera}/${numbuild.builds[0].number}/api/json`);
|
|
456
|
+
if (numbuildExecucao && numbuildExecucao.inProgress === false) {
|
|
457
|
+
return false;
|
|
458
|
+
}
|
|
459
|
+
return true;
|
|
460
|
+
} else {
|
|
461
|
+
const numbuild = await this.jenkinsPost(`${this.jobs.qaTaAgbLibera}/api/json`);
|
|
462
|
+
const numbuildExecucao = await this.jenkinsPost(`${this.jobs.qaTaAgbLibera}/${numbuild.builds[0].number}/api/json`);
|
|
463
|
+
if (numbuildExecucao && numbuildExecucao.inProgress === false) {
|
|
464
|
+
return false;
|
|
465
|
+
}
|
|
466
|
+
return true;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
} catch {
|
|
470
|
+
return false
|
|
471
|
+
}
|
|
472
|
+
}
|
|
440
473
|
}
|
|
@@ -460,7 +460,7 @@ var BuildnatorClient = /** @class */ (function () {
|
|
|
460
460
|
switch (_a.label) {
|
|
461
461
|
case 0: return [4 /*yield*/, this.jenkinsPost("".concat(this.jobs.qaTaAgbLiberaEspecifica, "/buildWithParameters"), {
|
|
462
462
|
diretorioExecutaveis: diretorio,
|
|
463
|
-
|
|
463
|
+
baselineExecutaveis: baseline,
|
|
464
464
|
})];
|
|
465
465
|
case 1:
|
|
466
466
|
_a.sent();
|
|
@@ -681,6 +681,55 @@ var BuildnatorClient = /** @class */ (function () {
|
|
|
681
681
|
});
|
|
682
682
|
});
|
|
683
683
|
};
|
|
684
|
+
BuildnatorClient.prototype.verificarExecucaoLiberaVersao = function (projeto, tipo) {
|
|
685
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
686
|
+
var numbuild, numbuildExecucao, numbuild, numbuildExecucao, numbuild, numbuildExecucao, _a;
|
|
687
|
+
return __generator(this, function (_b) {
|
|
688
|
+
switch (_b.label) {
|
|
689
|
+
case 0:
|
|
690
|
+
_b.trys.push([0, 10, , 11]);
|
|
691
|
+
if (!(tipo && tipo === "especifica" && projeto === "agrimanager")) return [3 /*break*/, 3];
|
|
692
|
+
return [4 /*yield*/, this.jenkinsPost("".concat(this.jobs.qaAgmLiberaEspecifica, "/api/json"))];
|
|
693
|
+
case 1:
|
|
694
|
+
numbuild = _b.sent();
|
|
695
|
+
return [4 /*yield*/, this.jenkinsPost("".concat(this.jobs.qaAgmLiberaEspecifica, "/").concat(numbuild.builds[0].number, "/api/json"))];
|
|
696
|
+
case 2:
|
|
697
|
+
numbuildExecucao = _b.sent();
|
|
698
|
+
if (numbuildExecucao && numbuildExecucao.inProgress === false) {
|
|
699
|
+
return [2 /*return*/, false];
|
|
700
|
+
}
|
|
701
|
+
return [2 /*return*/, true];
|
|
702
|
+
case 3:
|
|
703
|
+
if (!(projeto === "agrimanager")) return [3 /*break*/, 6];
|
|
704
|
+
return [4 /*yield*/, this.jenkinsPost("".concat(this.jobs.qaAgmLibera, "/api/json"))];
|
|
705
|
+
case 4:
|
|
706
|
+
numbuild = _b.sent();
|
|
707
|
+
return [4 /*yield*/, this.jenkinsPost("".concat(this.jobs.qaAgmLibera, "/").concat(numbuild.builds[0].number, "/api/json"))];
|
|
708
|
+
case 5:
|
|
709
|
+
numbuildExecucao = _b.sent();
|
|
710
|
+
if (numbuildExecucao && numbuildExecucao.inProgress === false) {
|
|
711
|
+
return [2 /*return*/, false];
|
|
712
|
+
}
|
|
713
|
+
return [2 /*return*/, true];
|
|
714
|
+
case 6: return [4 /*yield*/, this.jenkinsPost("".concat(this.jobs.qaTaAgbLibera, "/api/json"))];
|
|
715
|
+
case 7:
|
|
716
|
+
numbuild = _b.sent();
|
|
717
|
+
return [4 /*yield*/, this.jenkinsPost("".concat(this.jobs.qaTaAgbLibera, "/").concat(numbuild.builds[0].number, "/api/json"))];
|
|
718
|
+
case 8:
|
|
719
|
+
numbuildExecucao = _b.sent();
|
|
720
|
+
if (numbuildExecucao && numbuildExecucao.inProgress === false) {
|
|
721
|
+
return [2 /*return*/, false];
|
|
722
|
+
}
|
|
723
|
+
return [2 /*return*/, true];
|
|
724
|
+
case 9: return [3 /*break*/, 11];
|
|
725
|
+
case 10:
|
|
726
|
+
_a = _b.sent();
|
|
727
|
+
return [2 /*return*/, false];
|
|
728
|
+
case 11: return [2 /*return*/];
|
|
729
|
+
}
|
|
730
|
+
});
|
|
731
|
+
});
|
|
732
|
+
};
|
|
684
733
|
return BuildnatorClient;
|
|
685
734
|
}());
|
|
686
735
|
exports.BuildnatorClient = BuildnatorClient;
|