Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2017-06-07 11:27:52 +0300
committerPawel Chojnacki <pawel@chojnacki.ws>2017-06-07 11:27:52 +0300
commitdbb3c28088b63c8cf40a90c599b6eedb4dfbbb66 (patch)
tree9e6c4d495e45355ef62c56c0c3e102f95220f89f /app/models/deployment.rb
parenta924152219c1367bf494f3f387d050ac3ff2d7d3 (diff)
parentdddc54aa0aea4088e5a233d18a62cb2435590fe9 (diff)
Merge remote-tracking branch 'upstream/master' into 28717-additional-metrics-review-branch
# Conflicts: # app/models/project_services/prometheus_service.rb # app/views/projects/services/_form.html.haml
Diffstat (limited to 'app/models/deployment.rb')
-rw-r--r--app/models/deployment.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/deployment.rb b/app/models/deployment.rb
index fbb97de4af6..fe7fa4e66b7 100644
--- a/app/models/deployment.rb
+++ b/app/models/deployment.rb
@@ -12,6 +12,7 @@ class Deployment < ActiveRecord::Base
delegate :name, to: :environment, prefix: true
after_create :create_ref
+ after_create :invalidate_cache
def commit
project.commit(sha)
@@ -33,6 +34,10 @@ class Deployment < ActiveRecord::Base
project.repository.create_ref(ref, ref_path)
end
+ def invalidate_cache
+ environment.expire_etag_cache
+ end
+
def manual_actions
@manual_actions ||= deployable.try(:other_actions)
end