locking now checks lock folder exists in s3
parent
11437bef19
commit
ae57f6ef66
|
|
@ -3073,16 +3073,18 @@ class Kubernetes {
|
||||||
}
|
}
|
||||||
createNamespacedJob(commands, image, mountdir, workingdir, environment, secrets) {
|
createNamespacedJob(commands, image, mountdir, workingdir, environment, secrets) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
for (let index = 0; index < 3; index++) {
|
||||||
const jobSpec = kubernetes_job_spec_factory_1.default.getJobSpec(commands, image, mountdir, workingdir, environment, secrets, this.buildGuid, this.buildParameters, this.secretName, this.pvcName, this.jobName, k8s);
|
try {
|
||||||
yield this.kubeClientBatch.createNamespacedJob(this.namespace, jobSpec);
|
const jobSpec = kubernetes_job_spec_factory_1.default.getJobSpec(commands, image, mountdir, workingdir, environment, secrets, this.buildGuid, this.buildParameters, this.secretName, this.pvcName, this.jobName, k8s);
|
||||||
cloud_runner_logger_1.default.log(`Build job created`);
|
yield this.kubeClientBatch.createNamespacedJob(this.namespace, jobSpec);
|
||||||
yield new Promise((promise) => setTimeout(promise, 5000));
|
cloud_runner_logger_1.default.log(`Build job created`);
|
||||||
cloud_runner_logger_1.default.log('Job created');
|
yield new Promise((promise) => setTimeout(promise, 5000));
|
||||||
}
|
cloud_runner_logger_1.default.log('Job created');
|
||||||
catch (error) {
|
return;
|
||||||
cloud_runner_logger_1.default.log(`Error occured creating job: ${error}`);
|
}
|
||||||
throw error;
|
catch (error) {
|
||||||
|
cloud_runner_logger_1.default.log(`Error occured creating job: ${error}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -162,28 +162,31 @@ class Kubernetes implements ProviderInterface {
|
||||||
environment: CloudRunnerEnvironmentVariable[],
|
environment: CloudRunnerEnvironmentVariable[],
|
||||||
secrets: CloudRunnerSecret[],
|
secrets: CloudRunnerSecret[],
|
||||||
) {
|
) {
|
||||||
try {
|
for (let index = 0; index < 3; index++) {
|
||||||
const jobSpec = KubernetesJobSpecFactory.getJobSpec(
|
try {
|
||||||
commands,
|
const jobSpec = KubernetesJobSpecFactory.getJobSpec(
|
||||||
image,
|
commands,
|
||||||
mountdir,
|
image,
|
||||||
workingdir,
|
mountdir,
|
||||||
environment,
|
workingdir,
|
||||||
secrets,
|
environment,
|
||||||
this.buildGuid,
|
secrets,
|
||||||
this.buildParameters,
|
this.buildGuid,
|
||||||
this.secretName,
|
this.buildParameters,
|
||||||
this.pvcName,
|
this.secretName,
|
||||||
this.jobName,
|
this.pvcName,
|
||||||
k8s,
|
this.jobName,
|
||||||
);
|
k8s,
|
||||||
await this.kubeClientBatch.createNamespacedJob(this.namespace, jobSpec);
|
);
|
||||||
CloudRunnerLogger.log(`Build job created`);
|
await this.kubeClientBatch.createNamespacedJob(this.namespace, jobSpec);
|
||||||
await new Promise((promise) => setTimeout(promise, 5000));
|
CloudRunnerLogger.log(`Build job created`);
|
||||||
CloudRunnerLogger.log('Job created');
|
await new Promise((promise) => setTimeout(promise, 5000));
|
||||||
} catch (error) {
|
CloudRunnerLogger.log('Job created');
|
||||||
CloudRunnerLogger.log(`Error occured creating job: ${error}`);
|
|
||||||
throw error;
|
return;
|
||||||
|
} catch (error) {
|
||||||
|
CloudRunnerLogger.log(`Error occured creating job: ${error}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue