public class SecureExecTask
extends org.gradle.api.DefaultTask
Exec
but it does not expose the command line parameters when build is executed with '-i' (--info) level.
It masks secret value configured via setSecretValue(String) from logging, task output and exception messages.
Replaces secret value with "[SECRET]".
It really helps debugging if we can see the output and logging without exposing secret values like GitHub auth token.| Constructor and Description |
|---|
SecureExecTask() |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
getCommandLine() |
java.lang.String |
getSecretValue() |
void |
secureExec() |
void |
setCommandLine(java.util.List<java.lang.String> commandLine) |
void |
setSecretValue(java.lang.String secretValue)
See
getSecretValue() |
addValidator, appendParallelSafeAction, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doLast, doLast, execute, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDidWork, getEnabled, getExecuter, getExtensions, getFinalizedBy, getGroup, getImpliesSubProjects, getInputs, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTemporaryDir, getTemporaryDirFactory, getValidators, hasProperty, injectIntoNewInstance, isEnabled, isHasCustomActions, leftShift, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setName, setOnlyIf, setOnlyIf, setProject, setProperty, setShouldRunAfter, shouldRunAfter, toStringpublic java.util.List<java.lang.String> getCommandLine()
public void setCommandLine(java.util.List<java.lang.String> commandLine)
commandLine - command line to be executedpublic java.lang.String getSecretValue()
public void setSecretValue(java.lang.String secretValue)
getSecretValue()public void secureExec()