log container state
parent
fe370d44d8
commit
c9cb010cfa
|
|
@ -1043,18 +1043,18 @@ class Kubernetes {
|
|||
});
|
||||
}
|
||||
static watchBuildJobUntilFinished() {
|
||||
var _a, _b, _c, _d, _e, _f, _g;
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const pod = (yield Kubernetes.watchPodUntilReadyAndRead()) || {};
|
||||
core.info(`Watching build job ${(_a = pod.metadata) === null || _a === void 0 ? void 0 : _a.name}`);
|
||||
core.info(`Watching build job ${(_a = pod.metadata) === null || _a === void 0 ? void 0 : _a.name} ${(_c = (_b = pod.status) === null || _b === void 0 ? void 0 : _b.containerStatuses) === null || _c === void 0 ? void 0 : _c[0].state}`);
|
||||
core.info(JSON.stringify({
|
||||
name: ((_b = pod.metadata) === null || _b === void 0 ? void 0 : _b.name) || '',
|
||||
name: ((_d = pod.metadata) === null || _d === void 0 ? void 0 : _d.name) || '',
|
||||
namespace: this.namespace,
|
||||
container: (_d = (_c = pod.status) === null || _c === void 0 ? void 0 : _c.containerStatuses) === null || _d === void 0 ? void 0 : _d[0].containerID,
|
||||
container: (_f = (_e = pod.status) === null || _e === void 0 ? void 0 : _e.containerStatuses) === null || _f === void 0 ? void 0 : _f[0].containerID,
|
||||
}, undefined, 4));
|
||||
let logs;
|
||||
try {
|
||||
logs = yield this.kubeClient.readNamespacedPodLog(((_e = pod.metadata) === null || _e === void 0 ? void 0 : _e.name) || '', this.namespace, (_g = (_f = pod.status) === null || _f === void 0 ? void 0 : _f.containerStatuses) === null || _g === void 0 ? void 0 : _g[0].containerID, true);
|
||||
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);
|
||||
}
|
||||
catch (error) {
|
||||
core.error(error);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -331,7 +331,7 @@ class Kubernetes {
|
|||
static async watchBuildJobUntilFinished() {
|
||||
const pod = (await Kubernetes.watchPodUntilReadyAndRead()) || {};
|
||||
|
||||
core.info(`Watching build job ${pod.metadata?.name}`);
|
||||
core.info(`Watching build job ${pod.metadata?.name} ${pod.status?.containerStatuses?.[0].state}`);
|
||||
|
||||
core.info(
|
||||
JSON.stringify(
|
||||
|
|
|
|||
Loading…
Reference in New Issue