native

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: Apache-2.0 Imports: 20 Imported by: 3

Documentation

Overview

Package native provides the ability for Vela to reconstruct a yaml configuration into an executable pipeline.

Usage:

import "github.com/go-vela/compiler/compiler/native"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseBytes

func ParseBytes(b []byte) (*types.Build, error)

ParseBytes converts a byte slice to a yaml configuration.

func ParseFile

func ParseFile(f *os.File) (*types.Build, error)

ParseFile converts an os.File into a yaml configuration.

func ParsePath

func ParsePath(p string) (*types.Build, error)

ParsePath converts a file path into a yaml configuration.

func ParseReader

func ParseReader(r io.Reader) (*types.Build, error)

ParseReader converts an io.Reader into a yaml configuration.

func ParseString

func ParseString(s string) (*types.Build, error)

ParseString converts a string into a yaml configuration.

Types

type Client

type Client struct {
	Github        registry.Service
	PrivateGithub registry.Service
	// contains filtered or unexported fields
}

func New

func New(ctx *cli.Context) (*Client, error)

New returns a Pipeline implementation that integrates with the supported registries.

func (*Client) CloneStage

func (c *Client) CloneStage(p *yaml.Build) (*yaml.Build, error)

CloneStage injects the stage clone process into a yaml configuration.

func (*Client) CloneStep

func (c *Client) CloneStep(p *yaml.Build) (*yaml.Build, error)

CloneStep injects the step clone process into a yaml configuration.

func (*Client) Compile

func (c *Client) Compile(v interface{}) (*pipeline.Build, error)

Compile produces an executable pipeline from a yaml configuration.

func (*Client) EnvironmentStages

func (c *Client) EnvironmentStages(s yaml.StageSlice) (yaml.StageSlice, error)

EnvironmentStages injects environment variables for each step in every stage in a yaml configuration.

func (*Client) EnvironmentSteps

func (c *Client) EnvironmentSteps(s yaml.StepSlice) (yaml.StepSlice, error)

EnvironmentSteps injects environment variables for each step in a yaml configuration.

func (*Client) ExpandStages

func (c *Client) ExpandStages(s yaml.StageSlice, tmpls map[string]*yaml.Template) (yaml.StageSlice, error)

ExpandStages injects the template for each templated step in every stage in a yaml configuration.

func (*Client) ExpandSteps

func (c *Client) ExpandSteps(s yaml.StepSlice, tmpls map[string]*yaml.Template) (yaml.StepSlice, error)

ExpandSteps injects the template for each templated step in a yaml configuration.

func (*Client) Parse

func (c *Client) Parse(v interface{}) (*types.Build, error)

Parse converts an object to a yaml configuration.

func (*Client) ScriptStages

func (c *Client) ScriptStages(s yaml.StageSlice) (yaml.StageSlice, error)

ScriptStages injects the script for each step in every stage in a yaml configuration.

func (*Client) ScriptSteps

func (c *Client) ScriptSteps(s yaml.StepSlice) (yaml.StepSlice, error)

ScriptSteps injects the script for each step in a yaml configuration.

func (*Client) TransformStages

func (c *Client) TransformStages(r *pipeline.RuleData, p *yaml.Build) (*pipeline.Build, error)

TransformStages converts a yaml configuration with stages into an executable pipeline.

func (*Client) TransformSteps

func (c *Client) TransformSteps(r *pipeline.RuleData, p *yaml.Build) (*pipeline.Build, error)

TransformSteps converts a yaml configuration with steps into an executable pipeline.

func (*Client) Validate

func (c *Client) Validate(p *yaml.Build) error

Validate verifies the yaml configuration is accurate.

func (*Client) WithBuild

func (c *Client) WithBuild(b *library.Build) compiler.Engine

WithBuild sets the library build type in the Engine.

func (*Client) WithFiles

func (c *Client) WithFiles(f []string) compiler.Engine

WithFiles sets the changeset files in the Engine.

func (*Client) WithRepo

func (c *Client) WithRepo(r *library.Repo) compiler.Engine

WithRepo sets the library repo type in the Engine.

func (*Client) WithUser

func (c *Client) WithUser(u *library.User) compiler.Engine

WithUser sets the library user type in the Engine.

Jump to

Keyboard shortcuts

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