Class SimpleProgramCommandLine

    • Constructor Detail

      • SimpleProgramCommandLine

        public SimpleProgramCommandLine​(@NotNull
                                        BuildRunnerContext runner,
                                        @NotNull
                                        java.lang.String executablePath,
                                        @NotNull
                                        java.util.List<java.lang.String> arguments)
      • SimpleProgramCommandLine

        public SimpleProgramCommandLine​(@NotNull
                                        java.util.Map<java.lang.String,​java.lang.String> env,
                                        @NotNull
                                        java.lang.String workingDir,
                                        @NotNull
                                        java.lang.String executablePath,
                                        @NotNull
                                        java.util.List<java.lang.String> arguments)
      • SimpleProgramCommandLine

        public SimpleProgramCommandLine​(@NotNull
                                        java.util.Map<java.lang.String,​java.lang.String> env,
                                        @NotNull
                                        java.lang.String workingDir,
                                        @NotNull
                                        java.lang.String executablePath,
                                        @NotNull
                                        java.util.List<java.lang.String> arguments,
                                        @NotNull
                                        java.lang.String argumentsLine)
        Parameters:
        env - environment variables
        workingDir - working directory of the running build
        executablePath - command line executable path
        arguments - list of escaped arguments which will be passed into the process
        argumentsLine - arguments string as these arguments are configured in build step. Used for logging, see getCommandLineForLogging(jetbrains.buildServer.util.PasswordReplacer)
        Since:
        2022.10
    • Method Detail

      • getExecutablePath

        @NotNull
        public java.lang.String getExecutablePath()
                                           throws RunBuildException
        Description copied from interface: ProgramCommandLine
        Returns either
        • full path
        • relative path to working dir
        • simply command name to be resolved by OS on the build agent
        to run
        Specified by:
        getExecutablePath in interface ProgramCommandLine
        Returns:
        file path to execute
        Throws:
        RunBuildException - on error in parameters or agent's machine environment
      • getWorkingDirectory

        @NotNull
        public java.lang.String getWorkingDirectory()
        Specified by:
        getWorkingDirectory in interface ProgramCommandLine
        Returns:
        executable working directory either relative on build checkout directory or absolute path
      • getEnvironment

        @NotNull
        public java.util.Map<java.lang.String,​java.lang.String> getEnvironment()
        Specified by:
        getEnvironment in interface ProgramCommandLine
        Returns:
        map of all environment variables to be set for process