logging improvement
parent
7995193cd8
commit
1d4028c426
|
|
@ -1035,7 +1035,7 @@ class Kubernetes {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
static watchBuildJobUntilFinished() {
|
static watchBuildJobUntilFinished() {
|
||||||
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
var _a, _b, _c, _d, _e, _f, _g;
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const pod = (yield Kubernetes.watchPodUntilReadyAndRead()) || {};
|
const pod = (yield Kubernetes.watchPodUntilReadyAndRead()) || {};
|
||||||
core.info(`Watching build job ${(_a = pod.metadata) === null || _a === void 0 ? void 0 : _a.name} ${JSON.stringify((_c = (_b = pod.status) === null || _b === void 0 ? void 0 : _b.containerStatuses) === null || _c === void 0 ? void 0 : _c[0].state, undefined, 4)}`);
|
core.info(`Watching build job ${(_a = pod.metadata) === null || _a === void 0 ? void 0 : _a.name} ${JSON.stringify((_c = (_b = pod.status) === null || _b === void 0 ? void 0 : _b.containerStatuses) === null || _c === void 0 ? void 0 : _c[0].state, undefined, 4)}`);
|
||||||
|
|
@ -1046,7 +1046,7 @@ class Kubernetes {
|
||||||
}, undefined, 4));
|
}, undefined, 4));
|
||||||
let logs;
|
let logs;
|
||||||
try {
|
try {
|
||||||
logs = yield this.kubeClient.readNamespacedPodLog(((_g = pod.metadata) === null || _g === void 0 ? void 0 : _g.name) || '', this.namespace, (_j = (_h = pod.status) === null || _h === void 0 ? void 0 : _h.containerStatuses) === null || _j === void 0 ? void 0 : _j[0].containerID, true);
|
logs = yield this.kubeClient.readNamespacedPodLog(((_g = pod.metadata) === null || _g === void 0 ? void 0 : _g.name) || '', this.namespace, undefined, true);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.error(error);
|
core.error(error);
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -342,12 +342,7 @@ class Kubernetes {
|
||||||
);
|
);
|
||||||
let logs;
|
let logs;
|
||||||
try {
|
try {
|
||||||
logs = await this.kubeClient.readNamespacedPodLog(
|
logs = await this.kubeClient.readNamespacedPodLog(pod.metadata?.name || '', this.namespace, undefined, true);
|
||||||
pod.metadata?.name || '',
|
|
||||||
this.namespace,
|
|
||||||
pod.status?.containerStatuses?.[0].containerID,
|
|
||||||
true,
|
|
||||||
);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.error(error);
|
core.error(error);
|
||||||
throw error;
|
throw error;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue