Jenkins Templating Engine - questions regarding interacting with arbitrary SCMs

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Jenkins Templating Engine - questions regarding interacting with arbitrary SCMs

steventerrana
Hello all! 

Context:
As part of the Jenkins Templating Engine, users define a configuration file in which they can specify a set of libraries to load. 

These libraries, in turn, map to a directory that may or may not exist in a set of configuration SCM repositories. 

For each library, JTE iterates over an array of Library Sources and for each SCM check the existence of a directory with the same name of the library to be loaded.  If present, the library is loaded.  If not, the next SCM repository is checked.  If no library sources contain the library, an exception is thrown.

Questions: 
The current implementation works by using the SCM API's SCMFileSystem.
  1. Does it seem worth-while to extend support to SCM types that do not implement the SCM API spec? 
  2. If so, are there pointers for a performant way to query for the existence of a directory within an arbitrary SCM? 
Interacting with arbitrary SCMs has been the most challenging part of this plugin 😅. 

Thank you for any insights! 

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/5f62bb16-738f-41c4-9c71-5749d039c8f7n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Jenkins Templating Engine - questions regarding interacting with arbitrary SCMs

Mark Waite-2
Considering the number of existing implementations of SCMFileSystem.Builder and the number of implementations of SCMSource, I think it would be a better investment to add scm-api support to the plugins that need support in the Jenkins Templating Engine.  Already supported by Subversion, Perforce, PlasticSCM, and a collection of git providers (Bitbucket, GitHub, GitLab, and Gitea).  Additional providers seem to have implemented parts of the scm API like Mercurial, Gerrit, Backlog, and Tuleap.

On Wednesday, July 8, 2020 at 10:25:51 AM UTC-6 [hidden email] wrote:
Hello all! 

Context:
As part of the Jenkins Templating Engine, users define a configuration file in which they can specify a set of libraries to load. 

These libraries, in turn, map to a directory that may or may not exist in a set of configuration SCM repositories. 

For each library, JTE iterates over an array of Library Sources and for each SCM check the existence of a directory with the same name of the library to be loaded.  If present, the library is loaded.  If not, the next SCM repository is checked.  If no library sources contain the library, an exception is thrown.

Questions: 
The current implementation works by using the SCM API's SCMFileSystem.
  1. Does it seem worth-while to extend support to SCM types that do not implement the SCM API spec? 
  2. If so, are there pointers for a performant way to query for the existence of a directory within an arbitrary SCM? 
Interacting with arbitrary SCMs has been the most challenging part of this plugin 😅. 

Thank you for any insights! 

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/b5e01521-6288-4f7d-9e7f-373a0010881cn%40googlegroups.com.