Class JobEnvironment.Builder

  • Enclosing class:
    JobEnvironment

    public static class JobEnvironment.Builder
    extends java.lang.Object
    Builder to create an immutable JobEnvironment instance.
    Since:
    4.0.0
    • Constructor Detail

      • Builder

        public Builder()
        Constructor.
    • Method Detail

      • withEnvironmentVariables

        public JobEnvironment.Builder withEnvironmentVariables​(@Nullable
                                                               java.util.Map<java.lang.String,​java.lang.String> environmentVariables)
        Set any environment variables that the agent should add to the job runtime.
        Parameters:
        environmentVariables - Additional environment variables
        Returns:
        The builder
      • withExt

        public JobEnvironment.Builder withExt​(@Nullable
                                              com.fasterxml.jackson.databind.JsonNode ext)
        Set the extension configuration for the agent. This is generally used for specific implementations of the job launcher e.g. on Titus or local docker etc.
        Parameters:
        ext - The extension configuration which is effectively a DSL per job launch implementation
        Returns:
        The builder
      • build

        public JobEnvironment build()
        Build a new immutable instance of an JobEnvironment.
        Returns:
        An instance containing the fields set in this builder