rendertemplates

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Map

func Map(m map[string]interface{}) (map[string]interface{}, error)

Map performs a deep copy of the given map m.

func MatchingReleases

func MatchingReleases(allReleases []interface{}, since interface{}, until interface{}) []interface{}

MatchingReleases filters releases list against since and until releases

func ReleaseMatches

func ReleaseMatches(rel interface{}, since interface{}, until interface{}) bool

ReleaseMatches checks if the release falls between since and until releases

Types

type Config

type Config struct {
	Templates  []*TemplateConfig
	Global     map[string]interface{}
	GlobalSets map[string]ConfigSet `yaml:"globalSets,omitempty"`
}

Config represents configuration of all templates to render along with global values

func (*Config) Merge

func (cfg *Config) Merge()

Merge merges all jobconfigs using local / globalsets defined in the configuration

type ConfigSet

type ConfigSet map[string]interface{}

ConfigSet hold set of data for generating prowjob from template

type FromTo

type FromTo struct {
	From string
	To   string
}

FromTo defines what template should be used and where to store the render output

func (FromTo) String

func (ft FromTo) String() string

type InheritedConfigs

type InheritedConfigs struct {
	Global      []string `yaml:"global,omitempty"`
	Local       []string `yaml:"local,omitempty"`
	PreConfigs  []string `yaml:"preConfigs,omitempty"`
	PostConfigs []string `yaml:"postConfigs,omitempty"`
}

InheritedConfigs specify named configs to use for generating prowjob from template

type Job

type Job struct {
	InheritedConfigs InheritedConfigs `yaml:"inheritedConfigs,omitempty"`
	JobConfig        ConfigSet        `yaml:"jobConfig,omitempty"`
	// contains filtered or unexported fields
}

Job holds data for generating prowjob from template

type RenderConfig

type RenderConfig struct {
	To         string
	Values     map[string]interface{}
	LocalSets  map[string]ConfigSet `yaml:"localSets,omitempty"`
	JobConfigs []Repo               `yaml:"jobConfigs,omitempty"`
}

RenderConfig specifies where to render template and values to use

func (*RenderConfig) GenerateComponentJobs

func (r *RenderConfig) GenerateComponentJobs(global map[string]interface{})

GenerateComponentJobs generates jobs for components

type Repo

type Repo struct {
	RepoName string `yaml:"repoName,omitempty"`
	Jobs     []Job  `yaml:"jobs,omitempty"`
}

Repo represent github repository with associated prowjobs data

type TemplateConfig

type TemplateConfig struct {
	FromTo []FromTo `yaml:"fromTo,omitempty"`
	From   string
	Render []*RenderConfig
}

TemplateConfig specifies template to use and files to render

Jump to

Keyboard shortcuts

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