tests
parent
c3ec8518fc
commit
7243511cfb
|
|
@ -4198,22 +4198,6 @@ class KubernetesTaskRunner {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
const configMapLogs = await kubeClient.readNamespacedConfigMap(`${jobName}-logs`, namespace);
|
|
||||||
if (configMapLogs.body.data) {
|
|
||||||
const logs = configMapLogs.body.data[`logs`] || ``;
|
|
||||||
cloud_runner_logger_1.default.log(logs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
cloud_runner_logger_1.default.log(`Error reading config map${namespace} ${jobName}-logs ${error} `);
|
|
||||||
const configMaps = await kubeClient.listNamespacedConfigMap(namespace);
|
|
||||||
cloud_runner_logger_1.default.log(JSON.stringify(configMaps.body.items.map((x) => {
|
|
||||||
return {
|
|
||||||
name: x.metadata?.name || ``,
|
|
||||||
};
|
|
||||||
})));
|
|
||||||
}
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
static async watchUntilPodRunning(kubeClient, podName, namespace) {
|
static async watchUntilPodRunning(kubeClient, podName, namespace) {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -101,26 +101,6 @@ class KubernetesTaskRunner {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
const configMapLogs = await kubeClient.readNamespacedConfigMap(`${jobName}-logs`, namespace);
|
|
||||||
if (configMapLogs.body.data) {
|
|
||||||
const logs = configMapLogs.body.data[`logs`] || ``;
|
|
||||||
CloudRunnerLogger.log(logs);
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
CloudRunnerLogger.log(`Error reading config map${namespace} ${jobName}-logs ${error} `);
|
|
||||||
const configMaps = await kubeClient.listNamespacedConfigMap(namespace);
|
|
||||||
CloudRunnerLogger.log(
|
|
||||||
JSON.stringify(
|
|
||||||
configMaps.body.items.map((x) => {
|
|
||||||
return {
|
|
||||||
name: x.metadata?.name || ``,
|
|
||||||
};
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,8 @@ describe('Cloud Runner Kubernetes', () => {
|
||||||
- name: 'step 1'
|
- name: 'step 1'
|
||||||
image: 'ubuntu'
|
image: 'ubuntu'
|
||||||
commands: |
|
commands: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install curl -y
|
||||||
curl http://$LOG_SERVICE_IP:80`,
|
curl http://$LOG_SERVICE_IP:80`,
|
||||||
};
|
};
|
||||||
if (CloudRunnerOptions.providerStrategy !== `k8s`) {
|
if (CloudRunnerOptions.providerStrategy !== `k8s`) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue