mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-07 20:35:33 -04:00
podname logs for log service
This commit is contained in:
parent
a275c2ec4a
commit
7d2704c3e4
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
@ -113,6 +113,17 @@ status: {}
|
||||
true,
|
||||
);
|
||||
|
||||
// if status of pod is not running, then continue
|
||||
const podStatus = await CloudRunnerSystem.Run(
|
||||
`kubectl get pods -n ${namespace} ${podname} -o jsonpath='{.status.phase}'`,
|
||||
false,
|
||||
true,
|
||||
);
|
||||
if (podStatus !== 'Running') {
|
||||
CloudRunnerLogger.log(`Pod status: ${podStatus}`);
|
||||
continue;
|
||||
}
|
||||
|
||||
const logs = await CloudRunnerSystem.Run(`kubectl logs ${podname} -f --timestamps`, false, true);
|
||||
CloudRunnerLogger.log(`Logs: ${logs}`);
|
||||
|
||||
|
@ -44,8 +44,9 @@ describe('Cloud Runner Kubernetes', () => {
|
||||
const kubeConfig = new k8s.KubeConfig();
|
||||
kubeConfig.loadFromDefault();
|
||||
const kubeClient = kubeConfig.makeApiClient(k8s.CoreV1Api);
|
||||
const kubeClientApps = kubeConfig.makeApiClient(k8s.AppsV1Api);
|
||||
|
||||
await KubernetesLogService.createLogService('test', 'default', kubeClient);
|
||||
await KubernetesLogService.createLogDeployment('test', kubeClientApps, kubeClient);
|
||||
|
||||
CloudRunnerLogger.log(`run 1 succeeded`);
|
||||
}, 1_000_000_000);
|
||||
|
Loading…
Reference in New Issue
Block a user