Do not continue on error and error handling improvements

pull/273/head
Frostebite 2021-06-06 21:15:55 +01:00
parent aa2579095b
commit a2d1e8ac4f
4 changed files with 15 additions and 16 deletions

View File

@ -18,7 +18,6 @@ jobs:
k8sBuilds: k8sBuilds:
name: K8s build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }} name: K8s build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
continue-on-error: true
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:

14
dist/index.js vendored
View File

@ -1079,18 +1079,18 @@ class Kubernetes {
core.info(chunk.toString()); core.info(chunk.toString());
next(); next();
}; };
const logOptions = {
follow: true,
pretty: true,
previous: true,
};
try { try {
yield new Promise((resolve) => new client_node_1.Log(this.kubeConfig).log(this.namespace, this.podName, this.containerName, stream, resolve, { yield new Promise((resolve) => new client_node_1.Log(this.kubeConfig).log(this.namespace, this.podName, this.containerName, stream, resolve, logOptions));
follow: true,
pretty: true,
previous: true,
}));
core.info('end of log stream');
} }
catch (error) { catch (error) {
core.error(JSON.stringify(error, undefined, 4));
throw error; throw error;
} }
core.info('end of log stream');
}); });
} }
cleanup() { cleanup() {

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -366,19 +366,19 @@ class Kubernetes implements RemoteBuilderProviderInterface {
core.info(chunk.toString()); core.info(chunk.toString());
next(); next();
}; };
const logOptions = {
follow: true,
pretty: true,
previous: true,
};
try { try {
await new Promise((resolve) => await new Promise((resolve) =>
new Log(this.kubeConfig).log(this.namespace, this.podName, this.containerName, stream, resolve, { new Log(this.kubeConfig).log(this.namespace, this.podName, this.containerName, stream, resolve, logOptions),
follow: true,
pretty: true,
previous: true,
}),
); );
core.info('end of log stream');
} catch (error) { } catch (error) {
core.error(JSON.stringify(error, undefined, 4));
throw error; throw error;
} }
core.info('end of log stream');
} }
async cleanup() { async cleanup() {