batches

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: MIT Copyright (c) 2019 Hadrien Chauvin

SPDX-License-Identifier: MIT Copyright (c) 2019 Hadrien Chauvin

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

type Batch struct {
	Pipelines []Pipeline     `yaml:"pipelines"`
	Commands  []BatchCommand `yaml:"commands"`
}

func Read

func Read(config *config.Config, path string) (*Batch, error)

Read reads a pipeline from a file on the local file system. The path is given relative to the workspace root (see config.Config.WorkspaceDir).

The resulting pipeline is expanded: all the base pipelines that are referenced in the pipeline are merged.

func ReadFs

func ReadFs(config *config.Config, path string, fs afero.Fs) (*Batch, error)

ReadFs does the same as Read but on an arbitrary afero file system.

func (*Batch) Filter

func (batch *Batch) Filter(tagFilter string, focus string) (*Batch, error)

type BatchCommand

type BatchCommand struct {
	pipelines.BaseCommand `yaml:",inline"`

	Name      string   `yaml:"name" validate:"required,name"`
	Exclusive bool     `yaml:"exclusive"`
	Tags      []string `yaml:"tags" validate:"name"`
	DependsOn []string `yaml:"dependsOn" validate:"name"`
	Pipelines []string `yaml:"pipelines"`
	Flaky     bool     `yaml:"flaky"`
}

type Pipeline

type Pipeline struct {
	Name      string `yaml:"name" validate:"required,name"`
	Path      string `yaml:"path" validate:"required"`
	Setup     string `yaml:"setup"`
	TagFilter string `yaml:"tagFilter"`
}

Jump to

Keyboard shortcuts

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