Build server prototype (integration with GitHub / NuGet / etc)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
micro-build-server/BuildServer/lib/routes/manual.ts

28 lines
766 B

"use strict";
import * as express from "express";
import { build } from "../builder";
import { getSettings } from "../settings-wrapper";
import { ReportResult } from "../types";
8 years ago
export const get: express.RequestHandler = (_req, res) => res.render("manual");
export const post: express.RequestHandler = (req, res) => {
const settings = getSettings(req.app);
const options = {
...req.body,
url: `https://${settings.githubSiteRoot}/${req.body.owner}/${req.body.reponame}`,
};
build(settings, options, (err: string, result: ReportResult) => {
console.log("Done processing manual request");
console.log(`Error: ${err}`);
res.render("manual-done", {
err,
8 years ago
result,
});
});
8 years ago
};