/** * Track the usage of credentials in a specific build. * * @param build the run to tag the fingerprint * @param credentials the credentials to fingerprint. * @param <C> the credentials type. * @return the supplied credentials for method chaining. * @since 2.1.1 */ @NonNull public static <C extends Credentials> List<C> trackAll(@NonNull Run build, C... credentials) { if (credentials != null) { return trackAll(build, Arrays.asList(credentials)); } return Collections.emptyList(); }
/** * Track the usage of credentials in a specific node. * Would be used for example when launching an agent. * @param node the node to tag the fingerprint * @param credentials the credentials to fingerprint. * @param <C> the credentials type. * @return the supplied credentials for method chaining. * @since 2.1.1 */ @NonNull public static <C extends Credentials> List<C> trackAll(@NonNull Node node, C... credentials) { if (credentials != null) { return trackAll(node, Arrays.asList(credentials)); } return Collections.emptyList(); }
/** * Track the usage of credentials in a specific build. * * @param build the run to tag the fingerprint * @param credentials the credentials to fingerprint. * @param <C> the credentials type. * @return the supplied credentials for method chaining. * @since 2.1.1 */ @NonNull public static <C extends Credentials> List<C> trackAll(@NonNull Run build, C... credentials) { if (credentials != null) { return trackAll(build, Arrays.asList(credentials)); } return Collections.emptyList(); }
/** * Track the usage of credentials in a specific item but not associated with a specific build, for example SCM * polling. * * @param item the item to tag the fingerprint against * @param credentials the credentials to fingerprint. * @param <C> the credentials type. * @return the supplied credentials for method chaining. * @since 2.1.1 */ @NonNull public static <C extends Credentials> List<C> trackAll(@NonNull Item item, C... credentials) { if (credentials != null) { return trackAll(item, Arrays.asList(credentials)); } return Collections.emptyList(); }
/** * Track the usage of credentials in a specific node. * Would be used for example when launching an agent. * @param node the node to tag the fingerprint * @param credentials the credentials to fingerprint. * @param <C> the credentials type. * @return the supplied credentials for method chaining. * @since 2.1.1 */ @NonNull public static <C extends Credentials> List<C> trackAll(@NonNull Node node, C... credentials) { if (credentials != null) { return trackAll(node, Arrays.asList(credentials)); } return Collections.emptyList(); }
/** * Track the usage of credentials in a specific item but not associated with a specific build, for example SCM * polling. * * @param item the item to tag the fingerprint against * @param credentials the credentials to fingerprint. * @param <C> the credentials type. * @return the supplied credentials for method chaining. * @since 2.1.1 */ @NonNull public static <C extends Credentials> List<C> trackAll(@NonNull Item item, C... credentials) { if (credentials != null) { return trackAll(item, Arrays.asList(credentials)); } return Collections.emptyList(); }
/** * Track the usage of credentials in a specific build. * * @param build the run to tag the fingerprint * @param credentials the credentials to fingerprint. * @param <C> the credentials type. * @return the supplied credentials for method chaining. * @since 2.1.1 */ @CheckForNull public static <C extends Credentials> C track(@NonNull Run build, @CheckForNull C credentials) { if (credentials != null) { trackAll(build, Collections.singletonList(credentials)); } return credentials; }
/** * Track the usage of credentials in a specific node. * Would be used for example when launching an agent. * @param node the node to tag the fingerprint * @param credentials the credentials to fingerprint. * @param <C> the credentials type. * @return the supplied credentials for method chaining. * @since 2.1.1 */ @CheckForNull public static <C extends Credentials> C track(@NonNull Node node, @CheckForNull C credentials) { if (credentials != null) { trackAll(node, Collections.singletonList(credentials)); } return credentials; }
/** * Track the usage of credentials in a specific build. * * @param build the run to tag the fingerprint * @param credentials the credentials to fingerprint. * @param <C> the credentials type. * @return the supplied credentials for method chaining. * @since 2.1.1 */ @CheckForNull public static <C extends Credentials> C track(@NonNull Run build, @CheckForNull C credentials) { if (credentials != null) { trackAll(build, Collections.singletonList(credentials)); } return credentials; }
/** * Track the usage of credentials in a specific item but not associated with a specific build, for example SCM * polling. * * @param item the item to tag the fingerprint against * @param credentials the credentials to fingerprint. * @param <C> the credentials type. * @return the supplied credentials for method chaining. * @since 2.1.1 */ @CheckForNull public static <C extends Credentials> C track(@NonNull Item item, @CheckForNull C credentials) { if (credentials != null) { trackAll(item, Collections.singletonList(credentials)); } return credentials; }
/** * Track the usage of credentials in a specific node. * Would be used for example when launching an agent. * @param node the node to tag the fingerprint * @param credentials the credentials to fingerprint. * @param <C> the credentials type. * @return the supplied credentials for method chaining. * @since 2.1.1 */ @CheckForNull public static <C extends Credentials> C track(@NonNull Node node, @CheckForNull C credentials) { if (credentials != null) { trackAll(node, Collections.singletonList(credentials)); } return credentials; }
/** * Track the usage of credentials in a specific item but not associated with a specific build, for example SCM * polling. * * @param item the item to tag the fingerprint against * @param credentials the credentials to fingerprint. * @param <C> the credentials type. * @return the supplied credentials for method chaining. * @since 2.1.1 */ @CheckForNull public static <C extends Credentials> C track(@NonNull Item item, @CheckForNull C credentials) { if (credentials != null) { trackAll(item, Collections.singletonList(credentials)); } return credentials; }
LOGGER.log(Level.FINE, this.build + " - Track usage and mask password of credentials " + credentials.stream().map(new CredentialsToPrettyString()).collect(Collectors.joining(","))); CredentialsProvider.trackAll(build, new ArrayList<>(credentials));