summaryrefslogtreecommitdiff
path: root/config/routes.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-07-11 18:17:32 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-07-11 18:17:32 +0800
commitf601ec54fcfad7f365d3488c0a48575862c48958 (patch)
tree82802e72a5ee827b34be0b1a4355366adea3dde0 /config/routes.rb
parent8f469c33cc8b90e1bcae8ddd5599ce2a2957a3af (diff)
downloadgitlab-ce-f601ec54fcfad7f365d3488c0a48575862c48958.tar.gz
Introduce Projects::ArtifactsController#search:
So we redirect from ref and build_name to the particular build, namely: * /u/r/artifacts/ref/build_name/* -> /u/r/builds/:build_id/artifacts/* For: * download * browse * file
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 1572656b8c5..0a4b8609252 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -733,6 +733,12 @@ Rails.application.routes.draw do
resources :environments, only: [:index, :show, :new, :create, :destroy]
+ resources :artifacts, only: [] do
+ collection do
+ get :search, path: ':ref/:build_name(/*path)', format: false
+ end
+ end
+
resources :builds, only: [:index, :show], constraints: { id: /\d+/ } do
collection do
post :cancel_all