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
Tatuya Kamada
gitlab-ce
Commits
2cc9a785
Commit
2cc9a785
authored
Sep 14, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly create deployment using all possible options
parent
08272ec1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
+17
-7
app/models/ci/build.rb
app/models/ci/build.rb
+8
-7
lib/ci/api/entities.rb
lib/ci/api/entities.rb
+9
-0
No files found.
app/models/ci/build.rb
View file @
2cc9a785
...
@@ -79,13 +79,14 @@ module Ci
...
@@ -79,13 +79,14 @@ module Ci
after_transition
any
=>
[
:success
]
do
|
build
|
after_transition
any
=>
[
:success
]
do
|
build
|
if
build
.
environment
.
present?
if
build
.
environment
.
present?
service
=
CreateDeploymentService
.
new
(
build
.
project
,
build
.
user
,
service
=
CreateDeploymentService
.
new
(
environment:
build
.
environment
,
build
.
project
,
build
.
user
,
sha:
build
.
sha
,
environment:
build
.
environment
,
ref:
build
.
ref
,
sha:
build
.
sha
,
tag:
build
.
tag
,
ref:
build
.
ref
,
options:
build
.
options
[
:environment
],
tag:
build
.
tag
,
variables:
variables
)
options:
build
.
options
[
:environment
],
variables:
variables
)
service
.
execute
(
build
)
service
.
execute
(
build
)
end
end
end
end
...
...
lib/ci/api/entities.rb
View file @
2cc9a785
...
@@ -15,6 +15,15 @@ module Ci
...
@@ -15,6 +15,15 @@ module Ci
expose
:filename
,
:size
expose
:filename
,
:size
end
end
class
BuildOptions
<
Grape
::
Entity
expose
:image
expose
:services
expose
:artifacts
expose
:cache
expose
:dependencies
expose
:after_script
end
class
Build
<
Grape
::
Entity
class
Build
<
Grape
::
Entity
expose
:id
,
:ref
,
:tag
,
:sha
,
:status
expose
:id
,
:ref
,
:tag
,
:sha
,
:status
expose
:name
,
:token
,
:stage
expose
:name
,
:token
,
:stage
...
...
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