Implemented artifacts downloading

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 11 years ago
parent 9d462f7299
commit 2f7f4432db
  1. 14
      BuildServer/routes/artifact.js
  2. 1
      BuildServer/routes/index.js
  3. 6
      BuildServer/views/status.jade

@ -0,0 +1,14 @@
"use strict";
module.exports = function(req, res) {
var options = {
owner: req.params.owner,
reponame: req.params.reponame,
branchName: req.params.branch,
branch: "/refs/heads/" + req.params.branch,
rev: req.params.rev,
file: req.params.file
};
res.sendfile(req.app.get('releasepath') + "/" + options.owner + "/" + options.reponame + "/" + options.branch + "/" + options.rev + "/" + options.file);
};

@ -10,3 +10,4 @@ exports.index = function(req, res){
exports.postreceive = require('./postreceive');
exports.manual = require('./manual');
exports.status = require('./status');
exports.artifact = require('./artifact');

@ -17,6 +17,12 @@ block content
if err
h2 Error
pre #{err}
if files
h2 Artifacts
ul
each file in files
li
a(href="/artifact/" + [owner, reponame, branchName, rev, file].join("/")) #{file}
if report
h2 Result
pre

Loading…
Cancel
Save