mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-07 20:35:33 -04:00
stream logs through standard input and new remote client cli command
This commit is contained in:
parent
9e7fad6a8a
commit
8a3a366186
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.
@ -127,12 +127,14 @@ class Kubernetes implements ProviderInterface {
|
|||||||
? CloudRunner.lockedWorkspace
|
? CloudRunner.lockedWorkspace
|
||||||
: this.buildParameters.buildGuid;
|
: this.buildParameters.buildGuid;
|
||||||
this.pvcName = `unity-builder-pvc-${id}`;
|
this.pvcName = `unity-builder-pvc-${id}`;
|
||||||
|
if (process.env['CLOUD_RUNNER_MINIKUBE']) {
|
||||||
await KubernetesStorage.createPersistentVolumeClaim(
|
await KubernetesStorage.createPersistentVolumeClaim(
|
||||||
this.buildParameters,
|
this.buildParameters,
|
||||||
this.pvcName,
|
this.pvcName,
|
||||||
this.kubeClient,
|
this.kubeClient,
|
||||||
this.namespace,
|
this.namespace,
|
||||||
);
|
);
|
||||||
|
}
|
||||||
this.buildGuid = buildGuid;
|
this.buildGuid = buildGuid;
|
||||||
this.secretName = `build-credentials-${this.buildGuid}`;
|
this.secretName = `build-credentials-${this.buildGuid}`;
|
||||||
this.jobName = `unity-builder-job-${this.buildGuid}`;
|
this.jobName = `unity-builder-job-${this.buildGuid}`;
|
||||||
|
@ -107,6 +107,16 @@ class KubernetesJobSpecFactory {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (process.env['CLOUD_RUNNER_MINIKUBE']) {
|
||||||
|
job.spec.template.spec.volumes[0] = {
|
||||||
|
name: 'build-mount',
|
||||||
|
hostPath: {
|
||||||
|
path: `/data`,
|
||||||
|
type: `Directory`,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
job.spec.template.spec.containers[0].resources.requests[`ephemeral-storage`] = '10Gi';
|
job.spec.template.spec.containers[0].resources.requests[`ephemeral-storage`] = '10Gi';
|
||||||
|
|
||||||
return job;
|
return job;
|
||||||
|
@ -94,27 +94,7 @@ class KubernetesStorage {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
if (process.env['CLOUD_RUNNER_MINIKUBE']) {
|
|
||||||
pvc.spec.storageClassName = `manual`;
|
|
||||||
}
|
|
||||||
const result = await kubeClient.createNamespacedPersistentVolumeClaim(namespace, pvc);
|
const result = await kubeClient.createNamespacedPersistentVolumeClaim(namespace, pvc);
|
||||||
if (process.env['CLOUD_RUNNER_MINIKUBE']) {
|
|
||||||
const hostPathVolume = {
|
|
||||||
metadata: {
|
|
||||||
name: `${pvcName}-volume`,
|
|
||||||
labels: {
|
|
||||||
type: `local`,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
spec: {
|
|
||||||
storageClassName: `manual`,
|
|
||||||
capacity: { storage: `5Gi` },
|
|
||||||
accessModes: ['ReadWriteOnce'],
|
|
||||||
hostPath: { path: `/data/${pvcName}` },
|
|
||||||
},
|
|
||||||
};
|
|
||||||
await kubeClient.createPersistentVolume(hostPathVolume);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user