Class Utils
java.lang.Object
org.jenkins.plugins.lockableresources.queue.Utils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic final class -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontainsVariable(String value) Returnstruewhen the given string contains at least one${...}variable reference that will be resolved at build time.static EnvVarsExtract build parameters from aQueue.Itemand return them asEnvVarsso that${PARAM}references in resource names, labels and numbers are expanded.static Job<?, ?> getProject(Queue.Item item) static Job<?, ?> getProject(Run<?, ?> build) static LockableResourcesStructrequiredResources(Job<?, ?> project) Deprecated.static LockableResourcesStructrequiredResources(Job<?, ?> project, EnvVars additionalEnv) Build the required-resources structure for a project, merging any additional environment variables (e.g. build parameters) into the expansion context.
-
Method Details
-
getProject
-
getProject
-
requiredResources
@Deprecated @CheckForNull @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static LockableResourcesStruct requiredResources(@NonNull Job<?, ?> project) Deprecated.Build the required-resources structure for a project, without additional environment variables.- See Also:
-
requiredResources
@CheckForNull @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static LockableResourcesStruct requiredResources(@NonNull Job<?, ?> project, @CheckForNull EnvVars additionalEnv) Build the required-resources structure for a project, merging any additional environment variables (e.g. build parameters) into the expansion context.- Parameters:
project- the job whoseRequiredResourcesPropertyis readadditionalEnv- extra variables to use when expanding${...}references; may benull- Returns:
- the struct, or
nullif the project has no lockable-resource property
-
getParametersAsEnvVars
@NonNull @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static EnvVars getParametersAsEnvVars(@NonNull Queue.Item item) Extract build parameters from aQueue.Itemand return them asEnvVarsso that${PARAM}references in resource names, labels and numbers are expanded. -
containsVariable
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static boolean containsVariable(@CheckForNull String value) Returnstruewhen the given string contains at least one${...}variable reference that will be resolved at build time.
-