summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@gitlab.com>2014-11-05 09:51:39 +0000
committerDmitriy Zaporozhets <dzaporozhets@gitlab.com>2014-11-05 09:51:39 +0000
commit3559e3906a005a71183032bc06cf7538fc9d7d05 (patch)
tree5cd5f8f194ef03e10cac10cd7860c86aff5939bb /lib/api
parentf18299e45279ce2ffdaee22482e30e6f37c1f5b6 (diff)
parente1ea394072b9358d77a02a021cc79a37ddee1409 (diff)
downloadgitlab-ci-3559e3906a005a71183032bc06cf7538fc9d7d05.tar.gz
Merge branch 'parallel-builds' into 'master'
Parallel builds This merge contains next changes: * Replace project scripts textarea with jobs * Create multiple builds on push if there are multiple jobs * Change UI hierarchy to next chain: project -> commit -> builds * Requires GitLab 7.5.0pre or higher See merge request !83
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/builds.rb5
-rw-r--r--lib/api/projects.rb1
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/api/builds.rb b/lib/api/builds.rb
index f96c1d4..5d2c352 100644
--- a/lib/api/builds.rb
+++ b/lib/api/builds.rb
@@ -83,7 +83,10 @@ module API
required_attributes! [:project_id, :data, :project_token]
project = Project.find(params[:project_id])
authenticate_project_token!(project)
- build = CreateBuildService.new.execute(project, params[:data])
+ builds = CreateBuildsService.new.execute(project, params[:data])
+
+ # to keep api compatibility for now
+ build = builds.first
if build.persisted?
present build, with: Entities::Build
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index 5f4bfcf..d6cd689 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -72,6 +72,7 @@ module API
}
project = Project.new(filtered_params)
+ project.build_default_job
if project.save
present project, :with => Entities::Project