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 class
We need this converter to handle marshalling/unmarshalling of the build wrapper data: Relying on the default mechanism doesn't make it (becauseSecret
doesn't have theDataBoundConstructor
annotation).static final class
static class
Represents regexes defined by users in their jobs.static class
Represents name/password entries defined by users in their jobs.Nested classes/interfaces inherited from class jenkins.tasks.SimpleBuildWrapper
SimpleBuildWrapper.Context, SimpleBuildWrapper.Disposer
Nested classes/interfaces inherited from class hudson.tasks.BuildWrapper
BuildWrapper.Environment
Nested 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) void
makeBuildVariables
(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).void
makeSensitiveBuildVariables
(AbstractBuild build, Set<String> sensitiveVariables) boolean
void
setUp
(SimpleBuildWrapper.Context context, Run<?, ?> build, TaskListener listener, EnvVars initialEnvironment) Methods inherited from class jenkins.tasks.SimpleBuildWrapper
createContext, decorateLauncher, decorateLogger, getProjectActions, preCheckout, runPreCheckout, setUp, setUp
Methods inherited from class hudson.tasks.BuildWrapper
all, getProjectAction, setUp
Methods 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:
createLoggerDecorator
in classSimpleBuildWrapper
-
requiresWorkspace
public boolean requiresWorkspace()- Overrides:
requiresWorkspace
in classSimpleBuildWrapper
-
makeBuildVariables
Contributes the passwords defined by the user as variables that can be reused from build steps (and other places).- Overrides:
makeBuildVariables
in classSimpleBuildWrapper
-
makeSensitiveBuildVariables
- Overrides:
makeSensitiveBuildVariables
in classSimpleBuildWrapper
-
setUp
public void setUp(SimpleBuildWrapper.Context context, Run<?, ?> build, TaskListener listener, EnvVars initialEnvironment) throws IOException, InterruptedException- Overrides:
setUp
in classSimpleBuildWrapper
- Throws:
IOException
InterruptedException
-
getVarPasswordPairs
-
getVarMaskRegexes
-