diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-09-28 13:14:34 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-09-29 10:47:03 +0200 |
commit | 30c78e70cba395c1336611c58891a75473f8a037 (patch) | |
tree | e061fa88d4c325b9ffefa9783236018bfdc85c9d /app/models/ci/commit.rb | |
parent | 1530f68c9876bc8376bf4aa199c8abda570f5214 (diff) | |
download | gitlab-ce-30c78e70cba395c1336611c58891a75473f8a037.tar.gz |
WIP
Diffstat (limited to 'app/models/ci/commit.rb')
-rw-r--r-- | app/models/ci/commit.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/models/ci/commit.rb b/app/models/ci/commit.rb index 31638c7e1dc..9a719787649 100644 --- a/app/models/ci/commit.rb +++ b/app/models/ci/commit.rb @@ -32,14 +32,15 @@ module Ci sha[0...8] end - def project - @project ||= gl_project.gitlab_ci_project - end - def to_param sha end + def project + @project ||= gl_project.gitlab_ci_project + @project ||= gl_project.create_gitlab_ci_project + end + def last_build builds.order(:id).last end @@ -115,7 +116,6 @@ module Ci builds_attrs = config_processor.builds_for_stage_and_ref(stage, ref, tag) builds_attrs.map do |build_attrs| builds.create!({ - project: project, name: build_attrs[:name], commands: build_attrs[:script], tag_list: build_attrs[:tags], |