|
|
@@ -124,6 +124,12 @@ func CloudBrainCreate(ctx *context.Context, form auth.CreateCloudBrainForm) { |
|
|
|
uuid := form.Attachment |
|
|
|
jobType := form.JobType |
|
|
|
codePath := setting.JobPath + jobName + cloudbrain.CodeMountPath |
|
|
|
|
|
|
|
if jobType != string(models.JobTypeBenchmark) && jobType != string(models.JobTypeDebug) { |
|
|
|
log.Error("jobtype error:", jobType) |
|
|
|
ctx.RenderWithErr("jobtype error", tplCloudBrainNew, &form) |
|
|
|
return |
|
|
|
} |
|
|
|
repo := ctx.Repo.Repository |
|
|
|
downloadCode(repo, codePath) |
|
|
|
|
|
|
|