log container state

pull/265/head
Frostebite 2021-05-23 22:31:59 +01:00
parent c9cb010cfa
commit f7fa00bbed
3 changed files with 9 additions and 3 deletions

2
dist/index.js vendored
View File

@ -1046,7 +1046,7 @@ class Kubernetes {
var _a, _b, _c, _d, _e, _f, _g, _h, _j; var _a, _b, _c, _d, _e, _f, _g, _h, _j;
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} ${(_c = (_b = pod.status) === null || _b === void 0 ? void 0 : _b.containerStatuses) === null || _c === void 0 ? void 0 : _c[0].state}`); 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(JSON.stringify({ core.info(JSON.stringify({
name: ((_d = pod.metadata) === null || _d === void 0 ? void 0 : _d.name) || '', name: ((_d = pod.metadata) === null || _d === void 0 ? void 0 : _d.name) || '',
namespace: this.namespace, namespace: this.namespace,

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -331,7 +331,13 @@ class Kubernetes {
static async watchBuildJobUntilFinished() { static async watchBuildJobUntilFinished() {
const pod = (await Kubernetes.watchPodUntilReadyAndRead()) || {}; const pod = (await Kubernetes.watchPodUntilReadyAndRead()) || {};
core.info(`Watching build job ${pod.metadata?.name} ${pod.status?.containerStatuses?.[0].state}`); core.info(
`Watching build job ${pod.metadata?.name} ${JSON.stringify(
pod.status?.containerStatuses?.[0].state,
undefined,
4,
)}`,
);
core.info( core.info(
JSON.stringify( JSON.stringify(