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
Jérome Perrin
gitlab-ce
Commits
2a7f1eec
Commit
2a7f1eec
authored
Jun 21, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Memorize the value in methods rather than local
parent
98b60ee2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
app/services/create_deployment_service.rb
app/services/create_deployment_service.rb
+10
-6
No files found.
app/services/create_deployment_service.rb
View file @
2a7f1eec
...
...
@@ -14,10 +14,8 @@ class CreateDeploymentService
return
unless
executable?
ActiveRecord
::
Base
.
transaction
do
if
external_url
=
expanded_environment_url
environment
.
external_url
=
external_url
end
environment
.
external_url
=
expanded_environment_url
if
expanded_environment_url
environment
.
fire_state_event
(
action
)
return
unless
environment
.
save
...
...
@@ -53,7 +51,13 @@ class CreateDeploymentService
end
def
expanded_environment_url
ExpandVariables
.
expand
(
environment_options
[
:url
],
variables
)
if
return
@expanded_environment_url
if
defined?
(
@expanded_environment_url
)
@expanded_environment_url
=
ExpandVariables
.
expand
(
environment_url
,
variables
)
if
environment_url
end
def
environment_url
environment_options
[
:url
]
end
...
...
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