summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2015-12-28 11:43:15 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-01-14 12:48:14 +0100
commit8eeed761a9c25ea8ccfc347fbd3f5894b5957d9e (patch)
treeb5a07923abb806e7b24ce5cacba905288023bb1a /app/controllers
parent9e0e9342a47022a9caaa4a5596ec3ddb91fddc58 (diff)
downloadgitlab-ce-8eeed761a9c25ea8ccfc347fbd3f5894b5957d9e.tar.gz
Update specs for CI Build, add `artifacts?` method
`artifacts?` method checks if artifacts archive is available.
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/artifacts_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/projects/artifacts_controller.rb b/app/controllers/projects/artifacts_controller.rb
index 399aa11fcbe..18677fb1e95 100644
--- a/app/controllers/projects/artifacts_controller.rb
+++ b/app/controllers/projects/artifacts_controller.rb
@@ -15,6 +15,8 @@ class Projects::ArtifactsController < Projects::ApplicationController
end
def browse
+ return render_404 unless build.artifacts?
+
current_path = params[:path] ? "./#{params[:path]}/" : './'
artifacts_metadata = build.artifacts_metadata(current_path)
@path = Gitlab::StringPath.new(current_path, artifacts_metadata)