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:

10
dist/index.js vendored
View File

@ -1079,18 +1079,18 @@ class Kubernetes {
core.info(chunk.toString()); core.info(chunk.toString());
next(); next();
}; };
try { const logOptions = {
yield new Promise((resolve) => new client_node_1.Log(this.kubeConfig).log(this.namespace, this.podName, this.containerName, stream, resolve, {
follow: true, follow: true,
pretty: true, pretty: true,
previous: true, previous: true,
})); };
core.info('end of log stream'); try {
yield new Promise((resolve) => new client_node_1.Log(this.kubeConfig).log(this.namespace, this.podName, this.containerName, stream, resolve, logOptions));
} }
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();
}; };
try { const logOptions = {
await new Promise((resolve) =>
new Log(this.kubeConfig).log(this.namespace, this.podName, this.containerName, stream, resolve, {
follow: true, follow: true,
pretty: true, pretty: true,
previous: true, previous: true,
}), };
try {
await new Promise((resolve) =>
new Log(this.kubeConfig).log(this.namespace, this.podName, this.containerName, stream, resolve, logOptions),
); );
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() {