summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-03-05 23:14:02 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2017-03-05 23:34:20 +0100
commit829cc80e1d9147721f6edc137c52ed91500c931e (patch)
treec161aeac1405f366a3e35336ee13bf837c2a38ae /app/services
parent8a5557ce514fc5bd1a8e4e236713fd0910ce7e78 (diff)
downloadgitlab-ce-829cc80e1d9147721f6edc137c52ed91500c931e.tar.gz
Delete artifacts for pages unless expiry date is specifieddelete-pages
Diffstat (limited to 'app/services')
-rw-r--r--app/services/projects/update_pages_service.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/projects/update_pages_service.rb b/app/services/projects/update_pages_service.rb
index 2d42c4fc04a..523b9f41916 100644
--- a/app/services/projects/update_pages_service.rb
+++ b/app/services/projects/update_pages_service.rb
@@ -34,6 +34,8 @@ module Projects
end
rescue => e
error(e.message)
+ ensure
+ build.erase_artifacts! unless build.has_expiring_artifacts?
end
private