Documentation ¶
Index ¶
- Variables
- func BoundedCommands(commands []*api.Command, fromName, toName string) []*api.Command
- func ConvertAnnotations(annotations []model.Annotation) []*api.Annotation
- func DeduplicatePaths(paths []string) (result []string)
- func DownloadCache(executor *Executor, commandName string, cacheHost string, ...) bool
- func EnsureFolderExists(path string)
- func ExpandText(text string, customEnv map[string]string) string
- func ExpandTextOSFirst(text string, customEnv map[string]string) string
- func FetchCache(logUploader *LogUploader, commandName string, cacheHost string, ...) (*os.File, error)
- func InitializeLogSaveClient(taskIdentification *api.TaskIdentification, commandName string, raw bool) (api.CirrusCIService_SaveLogsClient, error)
- func InitializeLogStreamClient(taskIdentification *api.TaskIdentification, commandName string, raw bool) (api.CirrusCIService_StreamLogsClient, error)
- func ShellCommands(scripts []string, custom_env *map[string]string, handler ShellOutputHandler) (*exec.Cmd, error)
- func ShellCommandsAndGetOutput(scripts []string, custom_env *map[string]string, timeout *<-chan time.Time) (bool, string)
- func ShellCommandsAndWait(scripts []string, custom_env *map[string]string, handler ShellOutputHandler, ...) (*exec.Cmd, error)
- func TempFileName(prefix, suffix string) (*os.File, error)
- func UploadArtifacts(executor *Executor, name string, ...) bool
- func UploadCache(executor *Executor, commandName string, cacheHost string, ...) bool
- func UploadCacheFile(cacheHost string, cacheKey string, cacheFile *os.File) error
- type Cache
- type CommandAndLogs
- type Executor
- func (executor *Executor) CloneRepository(env map[string]string) bool
- func (executor *Executor) CreateFile(commandName string, instruction *api.FileInstruction, env map[string]string) bool
- func (executor *Executor) ExecuteScriptsAndStreamLogs(commandName string, scripts []string, env map[string]string) (*exec.Cmd, *LogUploader, error)
- func (executor *Executor) ExecuteScriptsStreamLogsAndWait(commandName string, scripts []string, env map[string]string) (*exec.Cmd, error)
- func (executor *Executor) RunBuild()
- type LogUploader
- func (uploader *LogUploader) Finalize()
- func (uploader *LogUploader) ReadAvailableChunks() ([]byte, bool)
- func (uploader *LogUploader) StreamLogs()
- func (uploader *LogUploader) UploadStoredOutput() error
- func (uploader *LogUploader) WithTimestamps(input []byte) []byte
- func (uploader *LogUploader) Write(bytes []byte) (int, error)
- func (uploader *LogUploader) WriteChunk(bytesToWrite []byte) (int, error)
- type ShellOutputHandler
- type ShellOutputWriter
Constants ¶
This section is empty.
Variables ¶
View Source
var TimeOutError = errors.New("timed out")
Functions ¶
func BoundedCommands ¶ added in v1.6.0
BoundedCommands bounds a slice of commands with unique names to a half-open range [fromName, toName).
func ConvertAnnotations ¶
func ConvertAnnotations(annotations []model.Annotation) []*api.Annotation
func DeduplicatePaths ¶ added in v1.15.0
func DownloadCache ¶
func EnsureFolderExists ¶
func EnsureFolderExists(path string)
func FetchCache ¶
func InitializeLogSaveClient ¶
func InitializeLogSaveClient(taskIdentification *api.TaskIdentification, commandName string, raw bool) (api.CirrusCIService_SaveLogsClient, error)
func InitializeLogStreamClient ¶
func InitializeLogStreamClient(taskIdentification *api.TaskIdentification, commandName string, raw bool) (api.CirrusCIService_StreamLogsClient, error)
func ShellCommands ¶
func ShellCommandsAndWait ¶
func ShellCommandsAndWait(scripts []string, custom_env *map[string]string, handler ShellOutputHandler, executionTimeout *<-chan time.Time) (*exec.Cmd, error)
return true if executed successful
func UploadArtifacts ¶
func UploadCache ¶
Types ¶
type Cache ¶
type CommandAndLogs ¶
type CommandAndLogs struct { Name string Cmd *exec.Cmd Logs *LogUploader }
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func NewExecutor ¶
func (*Executor) CloneRepository ¶
func (*Executor) CreateFile ¶
func (*Executor) ExecuteScriptsAndStreamLogs ¶
func (*Executor) ExecuteScriptsStreamLogsAndWait ¶
type LogUploader ¶
type LogUploader struct { // Fields related to the CIRRUS_LOG_TIMESTAMP behavioral environment variable LogTimestamps bool GetTimestamp func() time.Time OweTimestamp bool // contains filtered or unexported fields }
func NewLogUploader ¶
func (*LogUploader) Finalize ¶
func (uploader *LogUploader) Finalize()
func (*LogUploader) ReadAvailableChunks ¶
func (uploader *LogUploader) ReadAvailableChunks() ([]byte, bool)
func (*LogUploader) StreamLogs ¶
func (uploader *LogUploader) StreamLogs()
func (*LogUploader) UploadStoredOutput ¶
func (uploader *LogUploader) UploadStoredOutput() error
func (*LogUploader) WithTimestamps ¶ added in v1.17.0
func (uploader *LogUploader) WithTimestamps(input []byte) []byte
func (*LogUploader) WriteChunk ¶
func (uploader *LogUploader) WriteChunk(bytesToWrite []byte) (int, error)
type ShellOutputHandler ¶
type ShellOutputWriter ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.