Interface HelmExecSpec

  • All Implemented Interfaces:

    
    public interface HelmExecSpec
    
                        

    Configures and executes a Helm CLI command.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Unit executable(String executable) Sets the name of the executable to use.
      abstract Unit args(Iterable<Object> args) Adds some arguments to the CLI invocation.
      Unit args(Object args) Adds some arguments to the CLI invocation.
      Unit args(Provider<out Object> provider) Adds arguments supplied by a Gradle Provider to the CLI invocation.
      Unit flag(String name, Boolean value, Boolean defaultValue) Adds a flag argument to the command line.
      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.
      Unit option(String name, Object value) Adds an option argument to the command line, using the given value.
      Unit option(String name, Provider<out Object> provider) Adds an option argument to the command line, using a Provider to supply the option value.
      abstract Unit environment(String name, Provider<out Object> provider) Sets an environment variable for the process, using a Provider to supply the variable value.
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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 true or false (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 --flag to 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 unset
        defaultValue - 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 true or false (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 --flag to 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 value
        defaultValue - 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 variable
        provider - 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.