Fix ms_checker and parse big daemon log. (#11)
This commit is contained in:
Родитель
8e2d250582
Коммит
b3bb27611a
|
@ -82,7 +82,6 @@ function init(app) {
|
|||
}
|
||||
} else if (comment_body.startsWith(`/azpw ${MsChecker}`)) {
|
||||
check_suite = MsChecker
|
||||
if (pr_owner != 'liushilongbuaa'){ return }; //TODO remove test line.
|
||||
} else {
|
||||
app.log.info(`[ CONFLICT DETECT ] [${uuid}] comment: ${comment_body}, exit!`)
|
||||
return
|
||||
|
@ -154,26 +153,22 @@ function init(app) {
|
|||
description = `@${comment_at} Github Branch not ready<br>Please wait a few minutes to run again!<br>'/azpw ${MsConflict}'`
|
||||
} else if (run.status != 0){
|
||||
app.log.info([`[ CONFLICT DETECT ] [${uuid}] Unknown error liushilongbuaa need to check!`, url].join(" "))
|
||||
description = `@liushilongbuaa Please help check!`
|
||||
description = `@liushilongbuaa Please help check!<br>${mspr}<br>${tmp}`
|
||||
} else {
|
||||
app.log.info([`[ CONFLICT DETECT ] [${uuid}] Exit: 0`, url].join(" "))
|
||||
description = SUCCESS
|
||||
description = `${SUCCESS}<br>${mspr}`
|
||||
}
|
||||
check_create(app, context, uuid, owner, repo, commit, MsConflict, ms_conflict_result, COMPLETED, "MS conflict detect", description)
|
||||
}
|
||||
if ( ['ALL',MsChecker].includes(check_suite) ) {
|
||||
description = `Please check result in ${mspr}`
|
||||
if (pr_owner == 'liushilongbuaa') {
|
||||
if (ms_checker_result == InProgress){
|
||||
check_create(app, context, uuid, owner, repo, commit, MsChecker, null, InProgress, "MS PR validation", description)
|
||||
} else {
|
||||
check_create(app, context, uuid, owner, repo, commit, MsChecker, ms_checker_result, COMPLETED, "MS PR validation", description)
|
||||
}
|
||||
} //TODO remove test line.
|
||||
}
|
||||
if ( ! [0, 254, 253, 252].includes(run.status) ){
|
||||
app.log.error(`[ CONFLICT DETECT ] [${uuid}] Exit Code: ${run.status}`)
|
||||
if (ms_checker_result == InProgress){
|
||||
check_create(app, context, uuid, owner, repo, commit, MsChecker, null, InProgress, "MS PR validation", description)
|
||||
} else {
|
||||
check_create(app, context, uuid, owner, repo, commit, MsChecker, ms_checker_result, COMPLETED, "MS PR validation", description)
|
||||
}
|
||||
}
|
||||
app.log.error(`[ CONFLICT DETECT ] [${uuid}] Exit Code: ${run.status}`)
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
if (( $(stat --format %s /home/env_init_daemon.stderr)/1000/1000/1000 > 2 )); then
|
||||
cd /home
|
||||
mv env_init_daemon.stderr env_init_daemon.stderr.back
|
||||
split -l 1000000 -d env_init_daemon.stderr.back env_init_daemon.stderr.back
|
||||
cd -
|
||||
fi
|
||||
uuid=$1
|
||||
echo "$(date '+%FT%TZ') daemon script start!"
|
||||
cd site/wwwroot/workspace
|
||||
|
|
Загрузка…
Ссылка в новой задаче