Allow child pipelines to trigger their own child pipelines
Problem to solve
With https://gitlab.com/gitlab-org/gitlab-ce/issues/22972 we introduce the new idea of child/parent pipelines. For the MVC, however, we limit the relationship only to parent->child, and disallow parent->child->child->(...). One level of relationship is good for many use cases, but in a more complex workflow you have pipeline branches creating one or maybe two pipeline branches of their own.
- See https://gitlab.com/gitlab-org/gitlab-ce/issues/22972 for details on parent/child implementation.
Remove the limitation for child pipelines, and set a maximum depth for relationships. A decent starter value would be 5. If the max depth is reached, the pipeline should fail to start and return a failure status attribution, and there should be a clear message what happened.
Permissions and Security
The maximum depth is important to prevent recursive/runaway pipelines causing a denial of service.