entry : libraryVersions.entrySet()) {
52 | if (entry.getKey().matches("github[.]com/([^/]+)/([^/]+)")) {
53 | String name = entry.getKey();
54 | // Currently, GitHubSCMSource offers no particular advantage here over GitSCMSource.
55 | GitSCMSource scm = new GitSCMSource("https://" + name + ".git");
56 | scm.setTraits(Arrays.asList(
57 | new IgnoreOnPushNotificationTrait()
58 | ));
59 | LibraryConfiguration lib = new LibraryConfiguration(name, new SCMSourceRetriever(scm));
60 | lib.setDefaultVersion("master");
61 | libs.add(lib);
62 | }
63 | }
64 | return libs;
65 | }
66 |
67 | }
68 |
--------------------------------------------------------------------------------
/src/main/resources/index.jelly:
--------------------------------------------------------------------------------
1 |
2 |
25 |
26 |
27 |
28 | Allows Pipeline Groovy libraries to be loaded on the fly from GitHub.
29 |
30 |
--------------------------------------------------------------------------------