Package jenkins.tasks.filters.impl
Class RetainVariablesLocalRule
- java.lang.Object
-
- jenkins.tasks.filters.impl.RetainVariablesLocalRule
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<EnvVarsFilterLocalRule>
,Serializable
,EnvVarsFilterLocalRule
,EnvVarsFilterRule
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class RetainVariablesLocalRule extends Object implements EnvVarsFilterLocalRule
Local rule that removes all the non-retained variables for that step.- Since:
- 2.246
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RetainVariablesLocalRule.DescriptorImpl
static class
RetainVariablesLocalRule.ProcessVariablesHandling
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description RetainVariablesLocalRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
filter(EnvVars envVars, EnvVarsFilterRuleContext context)
In case the filter detects something that must stop the build, it must throw aEnvVarsFilterException
.RetainVariablesLocalRule.ProcessVariablesHandling
getProcessVariablesHandling()
String
getVariables()
boolean
isRetainCharacteristicEnvVars()
Whether to retain characteristic environment variables.void
setProcessVariablesHandling(RetainVariablesLocalRule.ProcessVariablesHandling processVariablesHandling)
void
setRetainCharacteristicEnvVars(boolean retainCharacteristicEnvVars)
void
setVariables(String variables)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jenkins.tasks.filters.EnvVarsFilterLocalRule
getDescriptor
-
Methods inherited from interface jenkins.tasks.filters.EnvVarsFilterRule
getDisplayName
-
-
-
-
Method Detail
-
setVariables
@DataBoundSetter public void setVariables(@NonNull String variables)
-
getVariables
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @NonNull public String getVariables()
-
setRetainCharacteristicEnvVars
@DataBoundSetter public void setRetainCharacteristicEnvVars(boolean retainCharacteristicEnvVars)
-
isRetainCharacteristicEnvVars
public boolean isRetainCharacteristicEnvVars()
Whether to retain characteristic environment variables.- Returns:
- true if and only if to retain characteristic environment variables.
- See Also:
Job.getCharacteristicEnvVars()
,Run.getCharacteristicEnvVars()
-
filter
public void filter(@NonNull EnvVars envVars, @NonNull EnvVarsFilterRuleContext context)
Description copied from interface:EnvVarsFilterRule
In case the filter detects something that must stop the build, it must throw aEnvVarsFilterException
. This method may be executed on agents through a remoting channel.- Specified by:
filter
in interfaceEnvVarsFilterRule
-
getProcessVariablesHandling
public RetainVariablesLocalRule.ProcessVariablesHandling getProcessVariablesHandling()
-
setProcessVariablesHandling
@DataBoundSetter public void setProcessVariablesHandling(RetainVariablesLocalRule.ProcessVariablesHandling processVariablesHandling)
-
-