summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-01-06 13:51:06 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2018-01-06 13:51:06 +0000
commita7a7f8b15968418bf52d91341588f1c573f412c3 (patch)
tree787f81c62ca03677798cd1fa9adf037b326f5c91 /app/controllers
parent6d972724d426938a0bfd6744dc6464ec5f7e17f9 (diff)
parentff5124ed6ecb2f20841e535b3aaa3b0d230f920f (diff)
downloadgitlab-ce-a7a7f8b15968418bf52d91341588f1c573f412c3.tar.gz
Merge branch '41249-clearing-the-cache' into 'master'
Resolve "Clearing the cache" Closes #41249 See merge request gitlab-org/gitlab-ce!16067
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/settings/ci_cd_controller.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/projects/settings/ci_cd_controller.rb b/app/controllers/projects/settings/ci_cd_controller.rb
index b029b31f9af..86717bb7242 100644
--- a/app/controllers/projects/settings/ci_cd_controller.rb
+++ b/app/controllers/projects/settings/ci_cd_controller.rb
@@ -11,6 +11,16 @@ module Projects
define_auto_devops_variables
end
+ def reset_cache
+ if ResetProjectCacheService.new(@project, current_user).execute
+ flash[:notice] = _("Project cache successfully reset.")
+ else
+ flash[:error] = _("Unable to reset project cache.")
+ end
+
+ redirect_to project_pipelines_path(@project)
+ end
+
private
def define_runners_variables