pipelineyml

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2021 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GittarFilePath = apistructs.DefaultPipelineYmlName
	GittarUserName = ""
	GittarPassWord = ""
)
View Source
const (
	RES_TYPE_BUILDPACK = "buildpack"
	RES_TYPE_BP_IMAGE  = "bp-image"
	RES_TYPE_SONAR     = "sonar"
	RES_TYPE_UT        = "ut"

	RES_TYPE_GIT = "git"
)

Variables

This section is empty.

Functions

func GetLanguagePaths

func GetLanguagePaths(p *Pipeline) []string

func GetReSources

func GetReSources(p *Pipeline) map[string]Resource

func GetStages

func GetStages(p *Pipeline) map[string]*Stage

Types

type Metadata

type Metadata []MetadataField

type MetadataField

type MetadataField struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type Params

type Params map[string]interface{}

type Pipeline

type Pipeline struct {
	Version string   `json:"version"`
	Stages  []*Stage `json:"stages,omitempty"`

	Envs map[string]string `json:"envs,omitempty"`

	Resources     []Resource     `json:"resources,omitempty"`
	ResourceTypes []ResourceType `json:"resource_types,omitempty"`
}

func ParsePipeline

func ParsePipeline(gittarURL, ref string) (*Pipeline, error)

type PipelineMetadata

type PipelineMetadata struct {
	// contains filtered or unexported fields
}

PipelineMetadata contains extra info needs by parse process.

type PipelineYml

type PipelineYml struct {
	// contains filtered or unexported fields
}

func New

func New(b []byte) *PipelineYml

func (*PipelineYml) CreatePipeline

func (y *PipelineYml) CreatePipeline(gittarURL, gittarBranch, commitId string) (*Pipeline, error)

func (*PipelineYml) Evaluate

func (y *PipelineYml) Evaluate(variables map[string]string) error

func (*PipelineYml) Unmarshal

func (y *PipelineYml) Unmarshal() error

Unmarshal unmarshal byteData to obj with evaluate, need metadata templateVars.

func (*PipelineYml) YAML

func (y *PipelineYml) YAML() (string, error)

type Resource

type Resource struct {
	Name string `json:"name"`
	Type string `json:"type"`
	// Optional
	Source Source `json:"source"`
}

type ResourceType

type ResourceType struct {
	Name   string `json:"name"`
	Type   string `json:"type"`
	Source Source `json:"source"`
}

type Source

type Source map[string]interface{}

type Stage

type Stage struct {
	Name        string       `json:"name,omitempty"`
	TaskConfigs []TaskConfig `json:"tasks,omitempty" ymal:"tasks" yml:"tasks" ymal.org:"tasks"`
}

type TaskConfig

type TaskConfig map[string]interface{}

type Version

type Version map[string]string

Jump to

Keyboard shortcuts

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