Savepoint
This commit is contained in:
parent
7db1a3456b
commit
02c483950c
45 changed files with 5136 additions and 256 deletions
|
@ -6,11 +6,10 @@ const jobStr = process.argv.slice(2)[0];
|
|||
const job = JSON.parse(jobStr);
|
||||
const { command } = job.spec.template.spec.containers[0];
|
||||
INFO("EXEC", "Internal Executor Starting!");
|
||||
cp.exec(command, (error, stdout, stderr)=>{
|
||||
if(error) ERR("EXEC", error);
|
||||
//if(stdout) VERB("EXEC-STDOUT", stdout);
|
||||
//if(stderr) VERB("EXEC-STDERR", stderr);
|
||||
OK("EXEC", "Internal Executor Finished!");
|
||||
process.exit(error? 1 : 0 );
|
||||
cp.exec(command, (error, stdout, stderr) => {
|
||||
if (error) ERR("EXEC", error);
|
||||
//if(stdout) VERB("EXEC-STDOUT", stdout);
|
||||
//if(stderr) VERB("EXEC-STDERR", stderr);
|
||||
OK("EXEC", "Internal Executor Finished!");
|
||||
process.exit(error ? 1 : 0);
|
||||
});
|
||||
|
||||
|
|
|
@ -5,9 +5,11 @@ import path from "path";
|
|||
const internalDeploy = process.env.INTERNAL_DEPLOY === "true";
|
||||
const executorUrl = process.env.EXECUTOR_URL;
|
||||
const executorScriptOnly = process.env.EXECUTOR_SCRIPT_ONLY === "true";
|
||||
const executorBin = process.env.EXECUTOR_BIN ?? `qltr-executor${executorScriptOnly ? ".js": ""}`;
|
||||
const executorBin =
|
||||
process.env.EXECUTOR_BIN ?? `qltr-executor${executorScriptOnly ? ".js" : ""}`;
|
||||
|
||||
const qualiteerUrl = process.env.QUALITEER_URL ?? "file:///home/runner/Qualiteer/bin/executor";
|
||||
const qualiteerUrl =
|
||||
process.env.QUALITEER_URL ?? "file:///home/runner/Qualiteer/bin/executor";
|
||||
|
||||
const kubCmd = "kubectl apply -f";
|
||||
const jobsDir = "jobs/";
|
||||
|
@ -16,11 +18,15 @@ const defaults = JSON.parse(
|
|||
);
|
||||
|
||||
const wrapCommand = (jobId, command) => {
|
||||
const bin = executorScriptOnly ? `node ${executorBin}`:`chmod +x ${executorBin} && ./${executorBin}`;
|
||||
const cmd = command.map((arg)=>JSON.stringify(arg))
|
||||
const curlCmd = `curl -o qltr-executor ${executorUrl} && ${bin} ${qualiteerUrl} ${jobId} ${cmd.join(" ")}`;
|
||||
const bin = executorScriptOnly
|
||||
? `node ${executorBin}`
|
||||
: `chmod +x ${executorBin} && ./${executorBin}`;
|
||||
const cmd = command.map((arg) => JSON.stringify(arg));
|
||||
const curlCmd = `curl -o qltr-executor ${executorUrl} && ${bin} ${qualiteerUrl} ${jobId} ${cmd.join(
|
||||
" "
|
||||
)}`;
|
||||
return curlCmd;
|
||||
}
|
||||
};
|
||||
|
||||
const createFile = (job) => {
|
||||
const { name } = job.metadata;
|
||||
|
|
|
@ -5,11 +5,15 @@ import express from "express";
|
|||
import results from "../routes/results-route.js";
|
||||
import alerting from "../routes/alerting-route.js";
|
||||
import react from "../routes/react-route.js";
|
||||
import tests from "../routes/tests-route.js";
|
||||
import catalog from "../routes/catalog-route.js";
|
||||
import jobs from "../routes/jobs-route.js";
|
||||
|
||||
import mock from "../routes/mock-route.js";
|
||||
|
||||
const app = express();
|
||||
// Special Routes
|
||||
app.all("/", (req, res) => res.redirect("/qualiteer"));
|
||||
if (process.env.MOCK_ROUTES === "true") app.use(mock);
|
||||
|
||||
// Middlewares
|
||||
|
||||
|
@ -17,7 +21,7 @@ app.all("/", (req, res) => res.redirect("/qualiteer"));
|
|||
app.use(react); // Static Build Route
|
||||
app.use("/api/results", results);
|
||||
app.use("/api/alerting", alerting);
|
||||
app.use("/api/tests", tests);
|
||||
app.use("/api/catalog", catalog);
|
||||
app.use("/api/jobs", jobs);
|
||||
|
||||
export default app;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue