runscript

package
v0.0.0-...-0117b6e Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 15 Imported by: 6

Documentation

Overview

Package runscript implements the RunScript plugin. RunPowerShellScript contains implementation of the plugin that runs powershell scripts on linux or windows

Package runscript implements the runscript plugin.

Package runscript implements the RunScript plugin. RunShellScript contains implementation of the plugin that runs shell scripts on linux

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRunPowerShellPlugin

func NewRunPowerShellPlugin(context context.T) (*runPowerShellPlugin, error)

NewRunPowerShellPlugin returns a new instance of the PSPlugin.

func NewRunShellPlugin

func NewRunShellPlugin(context context.T) (*runShellPlugin, error)

NewRunShellPlugin returns a new instance of the SHPlugin.

Types

type Plugin

type Plugin struct {
	Context context.T
	// ExecuteCommand is an object that can execute commands.
	CommandExecuter executers.T
	// Name is the plugin name (PowerShellScript or ShellScript)
	Name                  string
	ScriptName            string
	ShellCommand          string
	ShellArguments        []string
	ByteOrderMark         fileutil.ByteOrderMark
	IdentityRuntimeClient runtimeconfig.IIdentityRuntimeConfigClient
}

Plugin is the type for the runscript plugin.

func (*Plugin) Execute

func (p *Plugin) Execute(config contracts.Configuration, cancelFlag task.CancelFlag, output iohandler.IOHandler)

Execute runs multiple sets of commands and returns their outputs. res.Output will contain a slice of RunScriptPluginOutput.

type RunScriptPluginInput

type RunScriptPluginInput struct {
	contracts.PluginInput
	RunCommand       []string
	Environment      map[string]string
	ID               string
	WorkingDirectory string
	TimeoutSeconds   interface{}
}

RunScriptPluginInput represents one set of commands executed by the RunScript plugin.

Jump to

Keyboard shortcuts

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