Commit 2cc9a785 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Properly create deployment using all possible options

parent 08272ec1
...@@ -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
......
...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment