forked from joseph/gitea_CICD
check status
This commit is contained in:
parent
ee18ef3b03
commit
6f85d0aa48
26
index.js
26
index.js
|
|
@ -76,21 +76,23 @@ app.post("/git/gitea-webhook", async (req, res) => {
|
||||||
console.log(`Error executing command: ${error}`);
|
console.log(`Error executing command: ${error}`);
|
||||||
title += "New Git envent: " + giteaEvent;
|
title += "New Git envent: " + giteaEvent;
|
||||||
} else {
|
} else {
|
||||||
|
console.log(stdout);
|
||||||
|
if (
|
||||||
|
stderr.includes("Error") ||
|
||||||
|
stderr.includes("failed") ||
|
||||||
|
stdout.includes("Error") ||
|
||||||
|
stdout.includes("failed")
|
||||||
|
) {
|
||||||
|
title += "New Git envent: " + giteaEvent;
|
||||||
|
} else {
|
||||||
|
title += "New Git envent: " + giteaEvent + "(success)";
|
||||||
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
console.log(stdout);
|
|
||||||
checkStatus="ready"
|
checkStatus="ready"
|
||||||
// fs.writeFileSync("./service_run/checkFile", "false");
|
// fs.writeFileSync("./service_run/checkFile", "false");
|
||||||
if (
|
|
||||||
stderr.includes("Error") ||
|
}, 10000);
|
||||||
stderr.includes("failed") ||
|
|
||||||
stdout.includes("Error") ||
|
|
||||||
stdout.includes("failed")
|
|
||||||
) {
|
|
||||||
title += "New Git envent: " + giteaEvent;
|
|
||||||
} else {
|
|
||||||
title += "New Git envent: " + giteaEvent + "(success)";
|
|
||||||
}
|
|
||||||
}, 20000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (checkSendMail === "True") {
|
if (checkSendMail === "True") {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue