Interface HelmExecSpec
-
- All Implemented Interfaces:
public interface HelmExecSpecConfigures and executes a Helm CLI command.
-
-
Method Summary
Modifier and Type Method Description abstract Unitexecutable(String executable)Sets the name of the executable to use. abstract Unitargs(Iterable<Object> args)Adds some arguments to the CLI invocation. Unitargs(Object args)Adds some arguments to the CLI invocation. Unitargs(Provider<out Object> provider)Adds arguments supplied by a Gradle Provider to the CLI invocation. Unitflag(String name, Boolean value, Boolean defaultValue)Adds a flag argument to the command line. Unitflag(String name, Provider<Boolean> provider, Boolean defaultValue)Adds a flag argument to the command line, using a Provider to supply the flag value. Unitoption(String name, Object value)Adds an option argument to the command line, using the given value. Unitoption(String name, Provider<out Object> provider)Adds an option argument to the command line, using a Provider to supply the option value. abstract Unitenvironment(String name, Provider<out Object> provider)Sets an environment variable for the process, using a Provider to supply the variable value. abstract UnitassertSuccess(Boolean assertSuccess)If true (the default), executing the command will fail with an exception if the process returns a non-zero exit code. -
-
Method Detail
-
executable
abstract Unit executable(String executable)
Sets the name of the executable to use.
- Parameters:
executable- the executable
-
args
abstract Unit args(Iterable<Object> args)
Adds some arguments to the CLI invocation.
- Parameters:
args- the command line argument(s) to be added
-
args
Unit args(Object args)
Adds some arguments to the CLI invocation.
- Parameters:
args- the command line argument(s) to be added
-
args
Unit args(Provider<out Object> provider)
Adds arguments supplied by a Gradle Provider to the CLI invocation.
The provider is evaluated when the process is invoked, and if the provider has a value then it is added as a command-line argument.
If the provider has a Collection-typed value then each item of the collection is added as a separate argument.
- Parameters:
provider- the provider of the command line argument(s) to be added
-
flag
Unit flag(String name, Boolean value, Boolean defaultValue)
Adds a flag argument to the command line.
Flags are arguments that are either
trueorfalse(set or unset). Unless documented otherwise in the Helm CLI, most flags are unset by default and must be explicitly set.A flag will only be added to the command line if its value differs from the default value. A flag that is set will be added as
--flagto the command line, while a flag that is unset will be added as--flag=false.- Parameters:
name- the name of the flag, including the leading dashes (e.g.value- whether the flag should be set or unsetdefaultValue- whether the flag is considered set or unset by default
-
flag
Unit flag(String name, Provider<Boolean> provider, Boolean defaultValue)
Adds a flag argument to the command line, using a Provider to supply the flag value.
Flags are arguments that are either
trueorfalse(set or unset). Unless documented otherwise in the Helm CLI, most flags are unset by default and must be explicitly set.The provider is evaluated when the process is invoked, and its value is used to set/unset the flag. If the provider doesn't have a value then no argument will be added to the command line.
A flag will only be added to the command line if its value differs from the default value. A flag that is set will be added as
--flagto the command line, while a flag that is unset will be added as--flag=false.- Parameters:
name- the name of the flag, including the leading dashes (e.g.provider- provider of the flag valuedefaultValue- whether the flag is considered set or unset by default
-
option
Unit option(String name, Object value)
Adds an option argument to the command line, using the given value.
Options are arguments that have a value, like
--foo=bar.- Parameters:
name- the name of the option, including the leading dashes (e.g.value- the value of the option
-
option
Unit option(String name, Provider<out Object> provider)
Adds an option argument to the command line, using a Provider to supply the option value.
Options are arguments that have a value, like
--foo=bar.The provider is evaluated when the process is invoked, and its value used for the option. If the provider does not have a value, then the option will not be added at all.
- Parameters:
name- the name of the option, including the leading dashes (e.g.provider- the value of the option
-
environment
abstract Unit environment(String name, Provider<out Object> provider)
Sets an environment variable for the process, using a Provider to supply the variable value.
If the provider does not have a value, the environment variable will not be set.
- Parameters:
name- the name of the environment variableprovider- the provider supplying the value of the environment variable
-
assertSuccess
abstract Unit assertSuccess(Boolean assertSuccess)
If true (the default), executing the command will fail with an exception if the process returns a non-zero exit code.
-
-
-
-