Hi all,
I am preparing a proposal to add Multibranch Pipeline support to the Gitlab plugin. Existing Gitlab plugin does not support Multibranch pipeline builds in a way that it enables build triggers but cannot configure the variables (basically multibranch pipeline support is non-existent) - the API doesn't support it. But there are a lot of existing users that use the GitLab plugin at the moment and I fear API changes might break binary compatibility.
My suggestions is to develop 2 new plugins: a Gitlab API plugin and a Gitlab SCM Plugin.
1) Gitlab API plugin which, very similar to Github API plugin, wraps the Gitlab Java API.
2) Gitlab SCM plugin which will be a major design overhaul version of existing Gitlab Plugin to accomodate both pipeline and mulitbranch pipeline jobs along with other type of job configurations.
I have 2 ways to implement this:
Method 1:
1) I am thinking freestyle jobs will be deprecated in the future in favor of pipeline jobs. Gitlab plugin supports freestyle builds, so as long as freestyle builds are favoured the existing Gitlab plugin will support it.
2) Focusing on just pipeline will ease the task of designing API and handling the complexity due to which all the SCM plugins are divided into two i.e. <scm> plugin and <scm>-branch-source plugin.
Method 2:
1) If freestyle jobs are important and cannot be compromised then modify the Gitlab plugin to add multibranch pipeline support and find a way to take out Gitlab API and wrap it in a separate plugin. I haven't been able to figure out how much security risks and backwards compatibility will be involved in this method. Need someone with experience tell me about this.
Main Objective of this proposal: Just have one SCM plugin which does all type of jobs and remove users' confusion of having 2 separate SCM plugins and code duplication.
Need your feedbacks so that I can finalise which method to carry forward and start working on this proposal.
Thanks.
Regards,
Parichay (baymac)