fixes
parent
551b444c42
commit
c01f983ad0
|
@ -4023,13 +4023,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
const client_node_1 = __nccwpck_require__(89679);
|
|
||||||
const stream_1 = __nccwpck_require__(12781);
|
const stream_1 = __nccwpck_require__(12781);
|
||||||
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
|
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
|
||||||
const core = __importStar(__nccwpck_require__(42186));
|
const core = __importStar(__nccwpck_require__(42186));
|
||||||
const cloud_runner_statics_1 = __nccwpck_require__(90828);
|
const cloud_runner_statics_1 = __nccwpck_require__(90828);
|
||||||
const async_wait_until_1 = __importDefault(__nccwpck_require__(41299));
|
const async_wait_until_1 = __importDefault(__nccwpck_require__(41299));
|
||||||
const follow_log_stream_service_1 = __nccwpck_require__(64121);
|
const follow_log_stream_service_1 = __nccwpck_require__(64121);
|
||||||
|
const cloud_runner_system_1 = __nccwpck_require__(99393);
|
||||||
class KubernetesTaskRunner {
|
class KubernetesTaskRunner {
|
||||||
static runTask(kubeConfig, kubeClient, jobName, podName, containerName, namespace, alreadyFinished = false) {
|
static runTask(kubeConfig, kubeClient, jobName, podName, containerName, namespace, alreadyFinished = false) {
|
||||||
var _a;
|
var _a;
|
||||||
|
@ -4081,19 +4081,21 @@ class KubernetesTaskRunner {
|
||||||
*/
|
*/
|
||||||
// timestamps?: boolean;
|
// timestamps?: boolean;
|
||||||
// }
|
// }
|
||||||
const logOptions = {
|
// const logOptions = {
|
||||||
follow: !alreadyFinished,
|
// follow: !alreadyFinished,
|
||||||
pretty: false,
|
// pretty: false,
|
||||||
previous: alreadyFinished,
|
// previous: alreadyFinished,
|
||||||
timestamps: true,
|
// timestamps: true,
|
||||||
sinceSeconds: KubernetesTaskRunner.lastReceivedTimestamp,
|
// sinceSeconds: KubernetesTaskRunner.lastReceivedTimestamp,
|
||||||
};
|
// };
|
||||||
try {
|
try {
|
||||||
const resultError = yield new client_node_1.Log(kubeConfig).log(namespace, podName, containerName, stream, logOptions);
|
// const resultError = await new Log(kubeConfig).log(namespace, podName, containerName, stream, logOptions);
|
||||||
|
yield cloud_runner_system_1.CloudRunnerSystem.Run(`kubectl logs ${podName} -c ${containerName} > app.log`);
|
||||||
|
output += yield cloud_runner_system_1.CloudRunnerSystem.Run(`cat app.log`);
|
||||||
stream.destroy();
|
stream.destroy();
|
||||||
if (resultError) {
|
// if (resultError) {
|
||||||
throw resultError;
|
// throw resultError;
|
||||||
}
|
// }
|
||||||
if (!didStreamAnyLogs) {
|
if (!didStreamAnyLogs) {
|
||||||
core.error('Failed to stream any logs, listing namespace events, check for an error with the container');
|
core.error('Failed to stream any logs, listing namespace events, check for an error with the container');
|
||||||
core.error(JSON.stringify({
|
core.error(JSON.stringify({
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue