Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
8979567e
Commit
8979567e
authored
8 years ago
by
Z.J. van de Weg
Committed by
blackst0ne
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use deployment IID when saving refs
parent
25d00ea8
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
app/models/deployment.rb
app/models/deployment.rb
+1
-1
app/models/environment.rb
app/models/environment.rb
+2
-2
spec/controllers/projects/merge_requests_controller_spec.rb
spec/controllers/projects/merge_requests_controller_spec.rb
+1
-1
No files found.
app/models/deployment.rb
View file @
8979567e
...
...
@@ -102,6 +102,6 @@ class Deployment < ActiveRecord::Base
private
def
ref_path
File
.
join
(
environment
.
ref_path
,
'deployments'
,
id
.
to_s
)
File
.
join
(
environment
.
ref_path
,
'deployments'
,
i
i
d
.
to_s
)
end
end
This diff is collapsed.
Click to expand it.
app/models/environment.rb
View file @
8979567e
...
...
@@ -71,8 +71,8 @@ class Environment < ActiveRecord::Base
return
nil
unless
ref
deployment_id
=
ref
.
split
(
'/'
).
last
deployments
.
find
(
deployment_
id
)
deployment_i
i
d
=
ref
.
split
(
'/'
).
last
deployments
.
find
_by
(
iid:
deployment_i
id
)
end
def
ref_path
...
...
This diff is collapsed.
Click to expand it.
spec/controllers/projects/merge_requests_controller_spec.rb
View file @
8979567e
...
...
@@ -913,7 +913,7 @@ describe Projects::MergeRequestsController do
end
describe
'GET ci_environments_status'
do
context
'
when
the environment is from a forked project'
do
context
'the environment is from a forked project'
do
let!
(
:forked
)
{
create
(
:project
)
}
let!
(
:environment
)
{
create
(
:environment
,
project:
forked
)
}
let!
(
:deployment
)
{
create
(
:deployment
,
environment:
environment
,
sha:
forked
.
commit
.
id
,
ref:
'master'
)
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment