From 546a3c6561fbe967cc37ccc3229b71893cd20c34 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 2 Oct 2015 13:46:38 +0200 Subject: Refactor commit and build --- lib/ci/gitlab_ci_yaml_processor.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb index e625e790df8..861da770d3c 100644 --- a/lib/ci/gitlab_ci_yaml_processor.rb +++ b/lib/ci/gitlab_ci_yaml_processor.rb @@ -85,6 +85,7 @@ module Ci def build_job(name, job) { + stage_idx: stages.index(job[:stage]), stage: job[:stage], script: "#{@before_script.join("\n")}\n#{normalize_script(job[:script])}", tags: job[:tags] || [], -- cgit v1.2.1 From e3d870d7fc282a1f0a1028996c8b44e5d32b9cbf Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 5 Oct 2015 10:14:33 +0200 Subject: Add user to Ci::Build to have pusher email address --- lib/ci/api/commits.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/ci/api/commits.rb b/lib/ci/api/commits.rb index bac463a5909..6a5b52b17de 100644 --- a/lib/ci/api/commits.rb +++ b/lib/ci/api/commits.rb @@ -51,7 +51,7 @@ module Ci required_attributes! [:project_id, :data, :project_token] project = Ci::Project.find(params[:project_id]) authenticate_project_token!(project) - commit = Ci::CreateCommitService.new.execute(project, params[:data]) + commit = Ci::CreateCommitService.new.execute(project, params[:data], current_user) if commit.persisted? present commit, with: Entities::CommitWithBuilds -- cgit v1.2.1 From 317a7469545d0e9a70e54a87a540b8aabe4c418b Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 5 Oct 2015 12:02:26 +0200 Subject: Make commit_spec run --- lib/ci/gitlab_ci_yaml_processor.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb index 861da770d3c..c47951bc5d1 100644 --- a/lib/ci/gitlab_ci_yaml_processor.rb +++ b/lib/ci/gitlab_ci_yaml_processor.rb @@ -87,8 +87,8 @@ module Ci { stage_idx: stages.index(job[:stage]), stage: job[:stage], - script: "#{@before_script.join("\n")}\n#{normalize_script(job[:script])}", - tags: job[:tags] || [], + commands: "#{@before_script.join("\n")}\n#{normalize_script(job[:script])}", + tag_list: job[:tags] || [], name: name, only: job[:only], except: job[:except], -- cgit v1.2.1 From d2d2df0738f3cd8311963c34d90ebc8ce4081aa6 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 5 Oct 2015 13:12:00 +0200 Subject: Fix next round of tests --- lib/ci/api/commits.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/ci/api/commits.rb b/lib/ci/api/commits.rb index 6a5b52b17de..a60769d8305 100644 --- a/lib/ci/api/commits.rb +++ b/lib/ci/api/commits.rb @@ -51,7 +51,7 @@ module Ci required_attributes! [:project_id, :data, :project_token] project = Ci::Project.find(params[:project_id]) authenticate_project_token!(project) - commit = Ci::CreateCommitService.new.execute(project, params[:data], current_user) + commit = Ci::CreateCommitService.new.execute(project, current_user, params[:data]) if commit.persisted? present commit, with: Entities::CommitWithBuilds -- cgit v1.2.1