|
|
@ -467,7 +467,7 @@ class MyshixunsController < ApplicationController
|
|
|
|
|
|
|
|
|
|
|
|
# taskId 即返回的game id
|
|
|
|
# taskId 即返回的game id
|
|
|
|
# 返回结果:params [:stauts] 0 表示运行结果成功,其它则失败
|
|
|
|
# 返回结果:params [:stauts] 0 表示运行结果成功,其它则失败
|
|
|
|
# compile_success 1 表示成功; 0表示失败
|
|
|
|
# compile_success 1 表示成功; 0表示编译失败; -1 表示创建pod失败; -2 表示克隆代码失败
|
|
|
|
# msg 错误信息
|
|
|
|
# msg 错误信息
|
|
|
|
# output 为测试用户编译输出结果
|
|
|
|
# output 为测试用户编译输出结果
|
|
|
|
# myshixun:status 1为完成实训
|
|
|
|
# myshixun:status 1为完成实训
|
|
|
@ -475,7 +475,7 @@ class MyshixunsController < ApplicationController
|
|
|
|
# resubmit 1:表示已通关后重新评测;0:表示非重新评测
|
|
|
|
# resubmit 1:表示已通关后重新评测;0:表示非重新评测
|
|
|
|
# retry_status 0:初始值;1:重新评测失败;2:重新评测成功
|
|
|
|
# retry_status 0:初始值;1:重新评测失败;2:重新评测成功
|
|
|
|
# tpiRepoPath 中间层图片的workspace路径
|
|
|
|
# tpiRepoPath 中间层图片的workspace路径
|
|
|
|
# params[:jsonTestDetails] = '{"buildID":"19284","compileSuccess":"1",
|
|
|
|
# params[:jsonTestDetails] = '{"buildID":"19284","compileSuccess":"1","createPodStatus": "1", "downloadStatus": "1",
|
|
|
|
# "msg":[{"caseId":"1","expectedOutput":"MSAyIDMNCg","input":"MiAzIDE","output":"MSAyIDMNCg","passed":"1"},
|
|
|
|
# "msg":[{"caseId":"1","expectedOutput":"MSAyIDMNCg","input":"MiAzIDE","output":"MSAyIDMNCg","passed":"1"},
|
|
|
|
# {"caseId":"2","expectedOutput":"LTMgMSA2DQo","input":"LTMgNiAx","output":"LTMgMSA2DQo","passed":"1"},
|
|
|
|
# {"caseId":"2","expectedOutput":"LTMgMSA2DQo","input":"LTMgNiAx","output":"LTMgMSA2DQo","passed":"1"},
|
|
|
|
# {"caseId":"3","expectedOutput":"LTcgLTUgLTMNCg","input":"LTcgLTMgLTU","output":"LTcgLTUgLTMNCg","passed":"1"}],
|
|
|
|
# {"caseId":"3","expectedOutput":"LTcgLTUgLTMNCg","input":"LTcgLTMgLTU","output":"LTcgLTUgLTMNCg","passed":"1"}],
|
|
|
@ -497,7 +497,18 @@ class MyshixunsController < ApplicationController
|
|
|
|
resubmit = jsonTestDetails['resubmit']
|
|
|
|
resubmit = jsonTestDetails['resubmit']
|
|
|
|
outPut = tran_base64_decode64(jsonTestDetails['outPut'])
|
|
|
|
outPut = tran_base64_decode64(jsonTestDetails['outPut'])
|
|
|
|
jenkins_testsets = jsonTestDetails['msg']
|
|
|
|
jenkins_testsets = jsonTestDetails['msg']
|
|
|
|
compile_success = jsonTestDetails['compileSuccess']
|
|
|
|
# 创建pod的状态 0 失败 1 成功
|
|
|
|
|
|
|
|
create_pod_status = jsonTestDetails['createPodStatus']
|
|
|
|
|
|
|
|
# 克隆代码的装填 0 失败 1 成功
|
|
|
|
|
|
|
|
clone_code_status = jsonTestDetails['downloadStatus']
|
|
|
|
|
|
|
|
# 1表示编译成功;0 表示运行异常; -1 表示克隆代码失败; -2 表示创建pod失败
|
|
|
|
|
|
|
|
compile_success = if clone_code_status == "0"
|
|
|
|
|
|
|
|
-1
|
|
|
|
|
|
|
|
elsif create_pod_status == "0"
|
|
|
|
|
|
|
|
-2
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
jsonTestDetails['compileSuccess']
|
|
|
|
|
|
|
|
end
|
|
|
|
# message = Base64.decode64(params[:msg]) unless params[:msg].blank?
|
|
|
|
# message = Base64.decode64(params[:msg]) unless params[:msg].blank?
|
|
|
|
logger.info(outPut)
|
|
|
|
logger.info(outPut)
|
|
|
|
game = Game.find(game_id)
|
|
|
|
game = Game.find(game_id)
|
|
|
|