log stream from k8s http api
parent
7be71eba31
commit
5dab3928b9
|
|
@ -1076,7 +1076,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)}`);
|
||||||
|
|
@ -1087,7 +1087,7 @@ class Kubernetes {
|
||||||
}, undefined, 4));
|
}, undefined, 4));
|
||||||
let logs;
|
let logs;
|
||||||
try {
|
try {
|
||||||
logs = yield Kubernetes.getLogs(this.kubeConfig, this.namespace, ((_g = pod.metadata) === null || _g === void 0 ? void 0 : _g.name) || '', ((_j = (_h = pod.status) === null || _h === void 0 ? void 0 : _h.containerStatuses) === null || _j === void 0 ? void 0 : _j[0].containerID) || '');
|
logs = yield Kubernetes.getLogs(this.kubeConfig, this.namespace, ((_g = pod.metadata) === null || _g === void 0 ? void 0 : _g.name) || '', '');
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.error(error);
|
core.error(error);
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -389,12 +389,7 @@ class Kubernetes {
|
||||||
);
|
);
|
||||||
let logs;
|
let logs;
|
||||||
try {
|
try {
|
||||||
logs = await Kubernetes.getLogs(
|
logs = await Kubernetes.getLogs(this.kubeConfig, this.namespace, pod.metadata?.name || '', '');
|
||||||
this.kubeConfig,
|
|
||||||
this.namespace,
|
|
||||||
pod.metadata?.name || '',
|
|
||||||
pod.status?.containerStatuses?.[0].containerID || '',
|
|
||||||
);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.error(error);
|
core.error(error);
|
||||||
throw error;
|
throw error;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue