jenkins.scm.api.SCMProbe Java Examples
The following examples show how to use
jenkins.scm.api.SCMProbe.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GitHubSCMSource.java From github-branch-source-plugin with MIT License | 5 votes |
@NonNull @Override protected SCMProbe createProbe(@NonNull SCMHead head, @CheckForNull final SCMRevision revision) throws IOException { StandardCredentials credentials = Connector.lookupScanCredentials((Item) getOwner(), apiUri, credentialsId); // Github client and validation GitHub github = Connector.connect(apiUri, credentials); try { String fullName = repoOwner + "/" + repository; final GHRepository repo = github.getRepository(fullName); return new GitHubSCMProbe(github, repo, head, revision); } catch (IOException | RuntimeException | Error e) { Connector.release(github); throw e; } }
Example #2
Source File: GitLabSCMSource.java From gitlab-branch-source-plugin with GNU General Public License v2.0 | 4 votes |
@Nonnull @Override protected SCMProbe createProbe(@Nonnull SCMHead head, @CheckForNull SCMRevision revision) { return GitLabSCMProbe.create(this, head, revision); }
Example #3
Source File: GitHubSCMSource.java From github-integration-plugin with MIT License | 4 votes |
@Nonnull @Override protected SCMProbe createProbe(@Nonnull SCMHead head, @CheckForNull SCMRevision revision) throws IOException { return new GitHubSCMProbe(this, (GitHubSCMHead<?>) head, (GitHubSCMRevision) revision); }