public class ConfigurationPropertyValidator
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <T extends java.lang.Throwable> |
checkHttpTimeoutProperty(java.util.function.Function<java.lang.String,T> exceptionFactory)
Checks the
jib.httpTimeout system property for invalid (non-integer or negative)
values. |
static Authorization |
getImageAuth(JibLogger logger,
java.lang.String usernameProperty,
java.lang.String passwordProperty,
AuthProperty auth)
Gets an
Authorization from a username and password. |
public static <T extends java.lang.Throwable> void checkHttpTimeoutProperty(java.util.function.Function<java.lang.String,T> exceptionFactory)
throws T extends java.lang.Throwable
jib.httpTimeout system property for invalid (non-integer or negative)
values.T - the exception type to throw if invalid valuesexceptionFactory - factory to create an exception with the given descriptionT - if invalid valuesT extends java.lang.Throwable@Nullable public static Authorization getImageAuth(JibLogger logger, java.lang.String usernameProperty, java.lang.String passwordProperty, AuthProperty auth)
Authorization from a username and password. First tries system properties, then
tries build configuration, otherwise returns null.logger - the JibLogger used to print warnings messagesusernameProperty - the name of the username system propertypasswordProperty - the name of the password system propertyauth - the configured credentialsAuthorization from the system properties or build configuration, or
null if neither is configured.