Added artifact subfolders support

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 11 years ago
parent 537f1a9018
commit 717659aab3
  1. 5
      BuildServer/routes/status.js
  2. 1
      BuildServer/views/status.jade

@ -1,7 +1,8 @@
"use strict"; "use strict";
var fs = require('fs'), var fs = require('fs'),
url = require('url'); url = require('url'),
glob = require('glob');
var addBranchInfo = function (app, options, callback) { var addBranchInfo = function (app, options, callback) {
var branchFile = app.get('releasepath') + "/" + options.owner + "/" + options.reponame + "/$revs/" + options.rev + ".branch"; var branchFile = app.get('releasepath') + "/" + options.owner + "/" + options.reponame + "/$revs/" + options.rev + ".branch";
@ -58,7 +59,7 @@ var parseOptionsFromReferer = function (req, callback) {
var loadReport = function (app, options, callback) { var loadReport = function (app, options, callback) {
var releaseDir = app.get('releasepath') + "/" + options.owner + "/" + options.reponame + "/" + options.branch + "/" + options.rev; var releaseDir = app.get('releasepath') + "/" + options.owner + "/" + options.reponame + "/" + options.branch + "/" + options.rev;
fs.readdir(releaseDir, function (err, files) { glob("**", {cwd: releaseDir, mark: true}, function (err, files) {
if (err) { if (err) {
return callback(err, options); return callback(err, options);
} }

@ -21,6 +21,7 @@ block content
h2 Artifacts h2 Artifacts
ul ul
each file in files each file in files
if file[file.length-1] != "/"
li li
a(href="/artifact/" + [owner, reponame, branchName, rev, file].join("/")) #{file} a(href="/artifact/" + [owner, reponame, branchName, rev, file].join("/")) #{file}
if (report && report.result && report.result.messages && report.result.messages.$allMessages) if (report && report.result && report.result.messages && report.result.messages.$allMessages)

Loading…
Cancel
Save