static List<DomainRequirement> gitLabConnectionRequirements(String connectioName) { URIRequirementBuilder builder = URIRequirementBuilder.create(); try { URL connectionURL = new URL(gitLabConnection(connectioName).getUrl()); builder.withHostnamePort(connectionURL.getHost(), connectionURL.getPort()); } catch (Exception ignored) { LOGGER.fine("ignoring invalid gitlab-connection: " + connectioName); } return builder.build(); }
/** * Creates a new builder using the supplied URI. * * @param uri the URI to create the requirements of. * @return a new builder with the requirements of the supplied URI. */ @NonNull public static URIRequirementBuilder fromUri(@CheckForNull String uri) { return create().withUri(uri); }
/** * Creates a new builder using the supplied URI. * * @param uri the URI to create the requirements of. * @return a new builder with the requirements of the supplied URI. */ @NonNull public static URIRequirementBuilder fromUri(@CheckForNull String uri) { return create().withUri(uri); }
@CheckForNull String credentialsId) { if (credentialsId != null && sshRemote != null) { URIRequirementBuilder builder = URIRequirementBuilder.create(); URI serverUri = URI.create(serverUrl); if (serverUri.getHost() != null) {
? Tasks.getDefaultAuthenticationOf((Queue.Task) context) : ACL.SYSTEM, URIRequirementBuilder.create() .withHostname(RepositoryUriResolver.hostnameFromApiUri(apiUri)) .build()