diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-06-30 12:57:26 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-07-06 13:04:36 +0200 |
commit | 073c2a556e145d511e976b92f364b03aa4f3dd7f (patch) | |
tree | ef1d641b1eeec565cf2fd3a923fe95f97fb4c6be /app/models | |
parent | b27f990de8a1b53974eb9aa0bd6bdde18f93d6db (diff) | |
download | gitlab-ci-073c2a556e145d511e976b92f364b03aa4f3dd7f.tar.gz |
Added support for image and services
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/build.rb | 3 | ||||
-rw-r--r-- | app/models/commit.rb | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/app/models/build.rb b/app/models/build.rb index 6124c8f..ee56d3e 100644 --- a/app/models/build.rb +++ b/app/models/build.rb @@ -23,6 +23,8 @@ class Build < ActiveRecord::Base belongs_to :project belongs_to :runner + serialize :options + validates :commit, presence: true validates :status, presence: true validates :coverage, numericality: true, allow_blank: true @@ -63,6 +65,7 @@ class Build < ActiveRecord::Base def retry(build) new_build = Build.new(status: :pending) + new_build.options = build.options new_build.commands = build.commands new_build.tag_list = build.tag_list new_build.commit_id = build.commit_id diff --git a/app/models/commit.rb b/app/models/commit.rb index 73e485a..dae2658 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -108,7 +108,8 @@ class Commit < ActiveRecord::Base project: project, name: build_attrs[:name], commands: build_attrs[:script], - tag_list: build_attrs[:tags] + tag_list: build_attrs[:tags], + options: build_attrs[:options] }) end end @@ -145,6 +146,7 @@ class Commit < ActiveRecord::Base name: build_attrs[:name], commands: build_attrs[:script], tag_list: build_attrs[:tags], + options: build_attrs[:options], deploy: true }) end |