follow logs
parent
fd9e9d058a
commit
0bc5cf2adb
|
|
@ -1006,7 +1006,7 @@ class Kubernetes {
|
|||
};
|
||||
job.spec.backoffLimit = 1;
|
||||
const jobResults = yield this.kubeClientBatch.createNamespacedJob(this.namespace, job);
|
||||
core.info(jobResults.body);
|
||||
core.info(JSON.stringify(jobResults.body, undefined, 4));
|
||||
core.info('Job created');
|
||||
});
|
||||
}
|
||||
|
|
@ -1030,17 +1030,19 @@ class Kubernetes {
|
|||
else {
|
||||
ready = true;
|
||||
podname = (_d = element.metadata) === null || _d === void 0 ? void 0 : _d.name;
|
||||
core.info(JSON.stringify(element, undefined, 4));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
core.info(`Watching build job ${podname}`);
|
||||
const logs = yield this.kubeClient.readNamespacedPodLog(podname, this.namespace, undefined, true);
|
||||
yield new Promise((resolve) => {
|
||||
yield new Promise((resolve, reject) => {
|
||||
logs.response.on('data', (chunk) => {
|
||||
core.info(chunk);
|
||||
});
|
||||
logs.response.on('close', resolve);
|
||||
logs.response.on('error', reject);
|
||||
logs.response.on('end', resolve);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -292,7 +292,7 @@ class Kubernetes {
|
|||
};
|
||||
job.spec.backoffLimit = 1;
|
||||
const jobResults = await this.kubeClientBatch.createNamespacedJob(this.namespace, job);
|
||||
core.info(jobResults.body);
|
||||
core.info(JSON.stringify(jobResults.body, undefined, 4));
|
||||
core.info('Job created');
|
||||
}
|
||||
|
||||
|
|
@ -313,6 +313,7 @@ class Kubernetes {
|
|||
} else {
|
||||
ready = true;
|
||||
podname = element.metadata?.name;
|
||||
core.info(JSON.stringify(element, undefined, 4));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -321,11 +322,12 @@ class Kubernetes {
|
|||
core.info(`Watching build job ${podname}`);
|
||||
|
||||
const logs = await this.kubeClient.readNamespacedPodLog(podname, this.namespace, undefined, true);
|
||||
await new Promise((resolve) => {
|
||||
await new Promise((resolve, reject) => {
|
||||
logs.response.on('data', (chunk) => {
|
||||
core.info(chunk);
|
||||
});
|
||||
logs.response.on('close', resolve);
|
||||
logs.response.on('error', reject);
|
||||
logs.response.on('end', resolve);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue