Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-45503

Consolidate common traits into SCM-API

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      JENKINS-43507 added traits to a number of plugins.

      In order to side-step the problem of determining what the common traits for discovery and other cross-implementation concerns should look like, code duplication was used.

      The net result is that each of the implementations has duplicated code for:

      • Discovering Branches
      • Discovering Origin pull requests
      • Discovering Fork pull requests
      • Checking out over SSH
      • Overriding webhook management

      The intent is that these common traits can be moved into SCM API rather than duplicated by every SCM API implementation, but we need to determine the shape of these traits a bit better before that can take place as these traits so far are all effectively DVCS model traits.

      Ideally seeing the shape of traits for Subversion, Perforce and perhaps Accurev or Clearcase would help clarify what is required of a common implementation. 

      There is also the question of how to make the common traits not look common, for example:

      • Discover Branches: when used in Git or Mercurial, this probably does not need any options to be configured because these sources do not have the concept of pull requests. When used in GitHub, Bitbucket, Gitea, etc they do have the concept of pull requests and consequently there are multiple strategies that the user needs to select from.

      In the ideal case we would have just one BranchDiscovery trait, when added to a Git or Mercurial source it would not show any configuration and when added to a GitHub / Bitbucket / Gitea source it would display the strategy selection drop down list.

        Attachments

          Issue Links

            Activity

            stephenconnolly Stephen Connolly created issue -
            stephenconnolly Stephen Connolly made changes -
            Field Original Value New Value
            Link This issue blocks JENKINS-45504 [ JENKINS-45504 ]
            stephenconnolly Stephen Connolly made changes -
            Assignee Antonio Muñiz [ amuniz ]
            jamesdumay James Dumay made changes -
            Labels cloudbees-internal-pipeline technical-debt

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              stephenconnolly Stephen Connolly
              Votes:
              14 Vote for this issue
              Watchers:
              16 Start watching this issue

                Dates

                Created:
                Updated: