command

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const AnyVersionConstraint = ">= 0.0.0"

Variables

This section is empty.

Functions

func ApplyCertMount added in v0.2.0

func ApplyCertMount(containerExec *containerruntime.Container, certFile string, containerCertFile string)

func ApplyProxyConfiguration added in v0.2.0

func ApplyProxyConfiguration(containerExec *containerruntime.Container)

func ConvertNoProxyForJava added in v0.2.0

func ConvertNoProxyForJava(input string) string

func GetCABundleFromHost added in v0.2.0

func GetCABundleFromHost(target string)

func GetCertFileByType added in v0.2.0

func GetCertFileByType(certFileType string) string

GetCertFileByType returns the cert file by type (ca-bundle, java-keystore)

func GetCommandVersion

func GetCommandVersion(binary string) (string, error)

GetCommandVersion returns the version of an executable

func GetPlatformSpecificCommand

func GetPlatformSpecificCommand(platform string, file string, args string, workDir string) (*exec.Cmd, error)

GetPlatformSpecificCommand returns a platform-specific exec.Cmd

func ReplaceCommandPlaceholders added in v0.2.0

func ReplaceCommandPlaceholders(input string, env map[string]string) string

ReplaceCommandPlaceholders replaces env placeholders in a command

func RunAPICommand

func RunAPICommand(cmd APICommandExecute) (stdout string, stderr string, executionCandidate *config.BinaryExecutionCandidate, err error)

RunAPICommand gets called from actions or the api to execute commands

func RunCommand

func RunCommand(command string, env map[string]string, workDir string)

RunCommand runs a required command and forwards all output to console, but will panic/exit if the command fails

func RunCommandAndGetOutput

func RunCommandAndGetOutput(command string, env map[string]string, workDir string) (string, string, error)

RunCommandAndGetOutput runs a command and returns the full response / command output

func RunOptionalCommand

func RunOptionalCommand(command string, env map[string]string, workDir string) error

RunOptionalCommand runs a command and forwards all output to console

func RunSystemCommand added in v0.2.0

func RunSystemCommand(file string, args string, env map[string]string, workDir string, stdin io.Reader, stdout io.Writer, stderr io.Writer) error

RunSystemCommand runs a command and forwards all output to current console session

Types

type APICommandExecute added in v0.2.0

type APICommandExecute struct {
	Command                string
	Env                    map[string]string
	ProjectDir             string
	WorkDir                string
	TempDir                string
	Capture                bool
	Ports                  []int
	UserProvidedConstraint string
	Stdin                  io.Reader
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL