ciexec

package module
v0.0.0-...-886ad8c Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2017 License: MIT Imports: 12 Imported by: 0

README

ciexec GoDoc Build Status Build Status Build status

A command line tool for executing any CI configuration file (.travis.yml, .pulse.xml) like it was a shell script.

Installation

~ $ go get -u github.com/rjeczalik/ciexec

Documentation

godoc.org/github.com/rjeczalik/ciexec

cmd/ciexec GoDoc

Installation

~ $ go get -u github.com/rjeczalik/ciexec/cmd/ciexec

Documentation

godoc.org/github.com/rjeczalik/ciexec/cmd/ciexec

Documentation

Overview

Package ciexec implements functions to execute some CI configuration scripts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(file, detail string, w io.Writer) error

Exec detects the file's CI format type and executes it passing CI-specific detail string. It writes outputs from any commands it executes to the w.

func ExecBash

func ExecBash(cmds []string, w io.Writer) error

ExecBash runs script expressions in a single bash session. Execution loop does not stop, even if one of the commands exits with a code != 0. The function returns the last error encountered, if any.

func ExecCmd

func ExecCmd(cmds []*exec.Cmd, w io.Writer) error

ExecCmd runs commands in order they're stored in cmds, writing combined output from each command to w. Execution loop does not stop even if a command fails. The function returns the last error encountered, if any.

func OverrideEnv

func OverrideEnv(env, ovr []string) (mrg []string)

OverrideEnv overrides environment variables stored in env with ones from ovr. It ignores environment variables with empty values.

func SplitEnv

func SplitEnv(env []string) (m map[string]string)

SplitEnv splits key=value pairs from env into map, filtering out env with empty values.

Types

type Executable

type Executable struct {
	Args    string   `xml:"args,attr"`
	Exe     string   `xml:"exe,attr"`
	ArgList []string `xml:"arg"`
}

type Recipe

type Recipe struct {
	Name       string       `xml:"name,attr"`
	Executable []Executable `xml:"executable"`
}

Directories

Path Synopsis
Package bash provides simple interface to a shell session.
Package bash provides simple interface to a shell session.
cmd
ciexec
cmd/ciexec executes CI configuration file like it was a shell script.
cmd/ciexec executes CI configuration file like it was a shell script.

Jump to

Keyboard shortcuts

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