summaryrefslogtreecommitdiff
path: root/app/models/deployment.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-02 12:07:57 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-02 12:07:57 +0000
commit988b28ec1a379d38f6ac9ed04886ee564fd447fd (patch)
tree9d93267209387e62d23ea7abf81ef9c0d64f2f0b /app/models/deployment.rb
parenta325f3a104748ecc68df7c3d793940aa709a111f (diff)
downloadgitlab-ce-988b28ec1a379d38f6ac9ed04886ee564fd447fd.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/deployment.rb')
-rw-r--r--app/models/deployment.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/deployment.rb b/app/models/deployment.rb
index fbb59173a3c..b118404b916 100644
--- a/app/models/deployment.rb
+++ b/app/models/deployment.rb
@@ -135,7 +135,7 @@ class Deployment < ApplicationRecord
end
def create_ref
- project.repository.create_ref(ref, ref_path)
+ project.repository.create_ref(sha, ref_path)
end
def invalidate_cache
@@ -280,12 +280,12 @@ class Deployment < ApplicationRecord
errors.add(:ref, _('The branch or tag does not exist'))
end
- private
-
def ref_path
File.join(environment.ref_path, 'deployments', iid.to_s)
end
+ private
+
def legacy_finished_at
self.created_at if success? && !read_attribute(:finished_at)
end