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.Unbinder| Modifier | Constructor and Description |
|---|---|
protected |
AbstractOnDiskBinding(String variable,
String credentialsId) |
| Modifier and Type | Method and Description |
|---|---|
Binding.SingleEnvironment |
bindSingle(hudson.model.Run<?,?> build,
hudson.FilePath workspace,
hudson.Launcher launcher,
hudson.model.TaskListener listener)
Sets up bindings for a build.
|
protected abstract hudson.FilePath |
write(C credentials,
hudson.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, getPatternStringForSecrets, typepublic final Binding.SingleEnvironment bindSingle(@Nonnull hudson.model.Run<?,?> build, hudson.FilePath workspace, hudson.Launcher launcher, @Nonnull hudson.model.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 hudson.FilePath write(C credentials, hudson.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–2017. All rights reserved.