BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
8979567e
Commit
8979567e
authored
Oct 19, 2016
by
Z.J. van de Weg
Committed by
blackst0ne
Oct 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use deployment IID when saving refs
parent
25d00ea8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
deployment.rb
app/models/deployment.rb
+1
-1
environment.rb
app/models/environment.rb
+2
-2
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
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
...
...
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'
)
}
...
...
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