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
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
after_transition
any
=>
[
:success
]
do
|
build
|
if
build
.
environment
.
present?
service
=
CreateDeploymentService
.
new
(
build
.
project
,
build
.
user
,
environment:
build
.
environment
,
sha:
build
.
sha
,
ref:
build
.
ref
,
tag:
build
.
tag
,
options:
build
.
options
[
:environment
],
variables:
variables
)
service
=
CreateDeploymentService
.
new
(
build
.
project
,
build
.
user
,
environment:
build
.
environment
,
sha:
build
.
sha
,
ref:
build
.
ref
,
tag:
build
.
tag
,
options:
build
.
options
[
:environment
],
variables:
variables
)
service
.
execute
(
build
)
end
end
...
...
lib/ci/api/entities.rb
View file @
2cc9a785
...
...
@@ -15,6 +15,15 @@ module Ci
expose
:filename
,
:size
end
class
BuildOptions
<
Grape
::
Entity
expose
:image
expose
:services
expose
:artifacts
expose
:cache
expose
:dependencies
expose
:after_script
end
class
Build
<
Grape
::
Entity
expose
:id
,
:ref
,
:tag
,
:sha
,
:status
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