C - a kind of credentialspublic abstract class AbstractOnDiskBinding<C extends com.cloudbees.plugins.credentials.common.StandardCredentials> extends Binding<C>
UnbindableDir.
This can only safely be used for binding implementations for which BindingDescriptor.requiresWorkspace()
is true.Binding.Environment, Binding.SingleEnvironmentMultiBinding.MultiEnvironment, MultiBinding.NullUnbinder, MultiBinding.UnbinderExtensionPoint.LegacyInstancesAreScopedToHudson| Modifier | Constructor and Description |
|---|---|
protected |
AbstractOnDiskBinding(String variable,
String credentialsId) |
| Modifier and Type | Method and Description |
|---|---|
Binding.SingleEnvironment |
bindSingle(Run<?,?> build,
FilePath workspace,
Launcher launcher,
TaskListener listener)
Sets up bindings for a build.
|
protected abstract FilePath |
write(C credentials,
FilePath dir)
Writes credentials under a given temporary directory, and returns their path (will be bound to the variable).
|
bind, bind, getCredentials, getVariable, variablesgetCredentials, getCredentialsId, getDescriptor, type, variablespublic final Binding.SingleEnvironment bindSingle(@Nonnull Run<?,?> build, FilePath workspace, Launcher launcher, @Nonnull TaskListener listener) throws IOException, InterruptedException
BindingbindSingle in class Binding<C extends com.cloudbees.plugins.credentials.common.StandardCredentials>build - The build. Cannot be nullworkspace - The workspace - can be null if BindingDescriptor.requiresWorkspace() is false.launcher - The launcher - can be null if BindingDescriptor.requiresWorkspace() is false.listener - The task listener. Cannot be null.Binding.SingleEnvironmentIOExceptionInterruptedExceptionprotected abstract FilePath write(C credentials, FilePath dir) throws IOException, InterruptedException
credentials - the credentials to binddir - a temporary directory where credentials should be written. You can assume it has already been created,
with secure permissions.IOExceptionInterruptedExceptionCopyright © 2016–2021. All rights reserved.