Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2016-04-17 00:32:18 +0300
committerTomasz Maczukin <tomasz@maczukin.pl>2016-04-20 00:17:49 +0300
commit27d1349f2b2a909565073ef144acc51295313f50 (patch)
treeb8dccf84b88bb5731c3980a9add60ab2284601e5 /app/controllers/projects/builds_controller.rb
parentc3cc3320805af4f86a1304ace787ec56102e2204 (diff)
Add raw trace output for GitLab Workhorse
Diffstat (limited to 'app/controllers/projects/builds_controller.rb')
-rw-r--r--app/controllers/projects/builds_controller.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/controllers/projects/builds_controller.rb b/app/controllers/projects/builds_controller.rb
index f159e169f6d..c45e9809a83 100644
--- a/app/controllers/projects/builds_controller.rb
+++ b/app/controllers/projects/builds_controller.rb
@@ -1,7 +1,7 @@
class Projects::BuildsController < Projects::ApplicationController
before_action :build, except: [:index, :cancel_all]
before_action :authorize_read_build!, except: [:cancel, :cancel_all, :retry]
- before_action :authorize_update_build!, except: [:index, :show, :status]
+ before_action :authorize_update_build!, except: [:index, :show, :status, :raw_trace]
layout 'project'
def index
@@ -62,6 +62,14 @@ class Projects::BuildsController < Projects::ApplicationController
notice: "Build has been sucessfully erased!"
end
+ def raw
+ if @build.has_trace?
+ render json: { trace_file: @build.path_to_trace }
+ else
+ render json: {}, status: 404
+ end
+ end
+
private
def build