Class MaskPasswordsBuildWrapper
java.lang.Object
hudson.model.AbstractDescribableImpl<BuildWrapper>
hudson.tasks.BuildWrapper
jenkins.tasks.SimpleBuildWrapper
com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper
- All Implemented Interfaces:
ExtensionPoint,Describable<BuildWrapper>
Build wrapper that alters the console so that passwords don't get displayed.
- Author:
- Romain Seguy (http://openromain.blogspot.com)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classWe need this converter to handle marshalling/unmarshalling of the build wrapper data: Relying on the default mechanism doesn't make it (becauseSecretdoesn't have theDataBoundConstructorannotation).static final classstatic classRepresents regexes defined by users in their jobs.static classRepresents name/password entries defined by users in their jobs.Nested classes/interfaces inherited from class jenkins.tasks.SimpleBuildWrapper
SimpleBuildWrapper.Context, SimpleBuildWrapper.DisposerNested classes/interfaces inherited from class hudson.tasks.BuildWrapper
BuildWrapper.EnvironmentNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
ConstructorsConstructorDescriptionMaskPasswordsBuildWrapper(List<MaskPasswordsBuildWrapper.VarPasswordPair> varPasswordPairs) MaskPasswordsBuildWrapper(List<MaskPasswordsBuildWrapper.VarPasswordPair> varPasswordPairs, List<MaskPasswordsConfig.VarMaskRegexEntry> varMaskRegexes) -
Method Summary
Modifier and TypeMethodDescriptioncreateLoggerDecorator(Run<?, ?> build) voidmakeBuildVariables(AbstractBuild build, Map<String, String> variables) Contributes the passwords defined by the user as variables that can be reused from build steps (and other places).voidmakeSensitiveBuildVariables(AbstractBuild build, Set<String> sensitiveVariables) booleanvoidsetUp(SimpleBuildWrapper.Context context, Run<?, ?> build, TaskListener listener, EnvVars initialEnvironment) Methods inherited from class jenkins.tasks.SimpleBuildWrapper
createContext, decorateLauncher, decorateLogger, getProjectActions, preCheckout, runPreCheckout, setUp, setUpMethods inherited from class hudson.tasks.BuildWrapper
all, getProjectAction, setUpMethods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
MaskPasswordsBuildWrapper
@DataBoundConstructor public MaskPasswordsBuildWrapper(List<MaskPasswordsBuildWrapper.VarPasswordPair> varPasswordPairs, List<MaskPasswordsConfig.VarMaskRegexEntry> varMaskRegexes) -
MaskPasswordsBuildWrapper
-
-
Method Details
-
createLoggerDecorator
- Overrides:
createLoggerDecoratorin classSimpleBuildWrapper
-
requiresWorkspace
public boolean requiresWorkspace()- Overrides:
requiresWorkspacein classSimpleBuildWrapper
-
makeBuildVariables
Contributes the passwords defined by the user as variables that can be reused from build steps (and other places).- Overrides:
makeBuildVariablesin classSimpleBuildWrapper
-
makeSensitiveBuildVariables
- Overrides:
makeSensitiveBuildVariablesin classSimpleBuildWrapper
-
setUp
public void setUp(SimpleBuildWrapper.Context context, Run<?, ?> build, TaskListener listener, EnvVars initialEnvironment) throws IOException, InterruptedException- Overrides:
setUpin classSimpleBuildWrapper- Throws:
IOExceptionInterruptedException
-
getVarPasswordPairs
-
getVarMaskRegexes
-