summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2017-04-06 09:09:28 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2017-04-06 23:50:37 +0200
commite6571ed9f9f4220ac6a4634b037977b2bfa5e488 (patch)
tree2dfc6499dda3eebd23d62269ea09886a604ce729
parentf66e1c173406d2e447d46aab99f51c1277c801bc (diff)
downloadgitlab-ce-e6571ed9f9f4220ac6a4634b037977b2bfa5e488.tar.gz
Check if a commit belongs to pipeline before trying to expire cache
-rw-r--r--app/services/ci/expire_pipeline_cache_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/ci/expire_pipeline_cache_service.rb b/app/services/ci/expire_pipeline_cache_service.rb
index 983b30056e3..c0e4a798f6a 100644
--- a/app/services/ci/expire_pipeline_cache_service.rb
+++ b/app/services/ci/expire_pipeline_cache_service.rb
@@ -7,7 +7,7 @@ module Ci
store = Gitlab::EtagCaching::Store.new
store.touch(project_pipelines_path)
- store.touch(commit_pipelines_path)
+ store.touch(commit_pipelines_path) if pipeline.commit
store.touch(new_merge_request_pipelines_path)
merge_requests_pipelines_paths.each { |path| store.touch(path) }
end