runner

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package runner provides functions for running tasks in a tasks.yaml

Package runner provides functions for running tasks in a tasks.yaml

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecAction added in v0.2.0

func ExecAction(ctx context.Context, cfg types.ActionDefaults, cmd string, shellPref exec.ShellPreference, spinner helpers.ProgressWriter) (string, error)

ExecAction executes the given action configuration with the provided context

func GetBaseActionCfg added in v0.2.0

func GetBaseActionCfg[T any](cfg types.ActionDefaults, a types.BaseAction[T], vars variables.SetVariableMap[T]) types.ActionDefaults

GetBaseActionCfg merges the ActionDefaults with the BaseAction's configuration

func GetMaruVariableConfig added in v0.2.0

func GetMaruVariableConfig() *variables.VariableConfig[variables.ExtraVariableInfo]

GetMaruVariableConfig gets the variable configuration for Maru

func Run

func Run(tasksFile types.TasksFile, taskName string, setVariables map[string]string) error

Run runs a task from tasks file

func RunAction added in v0.2.0

func RunAction[T any](action *types.BaseAction[T], envFilePath string, variableConfig *variables.VariableConfig[T]) error

RunAction executes a specific action command, either wait or cmd. It handles variable loading environment variables and manages retries and timeouts

Types

type Runner

type Runner struct {
	TasksFile   types.TasksFile
	TaskNameMap map[string]bool
	// contains filtered or unexported fields
}

Runner holds the necessary data to run tasks from a tasks file

Jump to

Keyboard shortcuts

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