Add API endpoint for creating a new pipeline
Currently we are able to trigger builds using legacy build trigger API.
Unfortunately, although this endpoint creates a new pipeline under the hood, it does not expose information about the pipeline in the payload. This makes it difficult to monitor pipeline progress. See https://gitlab.com/gitlab-org/gitlab-ce/issues/23466.
I think that it makes sense to create a new API endpoint that would be part of the recently introduced pipelines API. Making it possible to create new pipeline using POST /projects/:project_id/pipelines
may be a good addition to existing features.
After adding POST /projects/:project_id/pipelines
we can deprecate build trigger API and remove it in %9.0