Documentation ¶
Index ¶
- Constants
- Variables
- func CheckSystemAndConfig(kubeAccess KubeAccess, buildCfg BuildConfig, parallel int) error
- func CreateBuildrunResultsChartJS(data []Result, w io.Writer) error
- func CreateChartJS(data []ResultSet, w io.Writer) error
- func CreateResultSetCSV(data []ResultSet, w io.Writer) error
- func CreateResultsCSV(data []Result, w io.Writer) error
- func ExecuteTestPlan(kubeAccess KubeAccess, testplan TestPlan) error
- type BuildConfig
- type BuildRunOption
- type KubeAccess
- type NamingConfig
- type Result
- func ExecuteBuilds(kubeAccess KubeAccess, namingCfg NamingConfig, buildCfg BuildConfig, count int) ([]Result, error)
- func ExecuteParallelBuildRuns(kubeAccess KubeAccess, namingCfg NamingConfig, buildCfg BuildConfig, ...) ([]Result, error)
- func ExecuteSingleBuildRun(kubeAccess KubeAccess, namespace string, name string, ...) (*Result, error)
- type ResultSet
- type TestPlan
- type Value
Constants ¶
const ( BuildrunCompletionTime = "BuildRun completion time" BuildrunControlTime = "BuildRun control time" TaskrunCompletionTime = "TaskRun completion time" TaskrunControlTime = "TaskRun control time" PodCompletionTime = "Pod completion time" PodControlTime = "Pod control time" BuildRegistrationTime = "Build registration time" )
Naming constants for the results
Variables ¶
var Debug bool
Debug enables or disables additional output
Functions ¶
func CheckSystemAndConfig ¶
func CheckSystemAndConfig(kubeAccess KubeAccess, buildCfg BuildConfig, parallel int) error
CheckSystemAndConfig sanity checks the cluster using the provided buildrun settings to verify whether a buildrun can work and how much pressure it would put onto the system
func CreateBuildrunResultsChartJS ¶ added in v0.4.1
CreateBuildrunResultsChartJS creates a page with ChartJS to display the results of buildruns
func CreateChartJS ¶
CreateChartJS creates a page with ChartsJS to render the provided results
func CreateResultSetCSV ¶ added in v0.5.0
CreateResultSetCSV creates a comma separated values (CSV) content based on the result sets
func CreateResultsCSV ¶ added in v0.5.0
CreateResultsCSV creates a comma separated values (CSV) content based on the buildruns
func ExecuteTestPlan ¶ added in v0.2.0
func ExecuteTestPlan(kubeAccess KubeAccess, testplan TestPlan) error
ExecuteTestPlan executes the given test plan step by step
Types ¶
type BuildConfig ¶ added in v0.3.0
type BuildConfig struct { ClusterBuildStrategy string SourceURL string SourceRevision string SourceContextDir string SourceSecretRef string SourceDockerfile string ServiceAccountName string OutputImageURL string OutputSecretRef string Timeout time.Duration SkipDelete bool SkipVerifySourceRepository bool }
BuildConfig contains all fields required to setup a buildRun
type BuildRunOption ¶ added in v0.3.6
type BuildRunOption func(*buildRunOptions)
BuildRunOption specifies optional settings for a buildrun
func ServiceAccountName ¶ added in v0.8.0
func ServiceAccountName(value string) BuildRunOption
ServiceAccountName sets the service account to be used, use empty string to generate one
func SkipDelete ¶ added in v0.3.6
func SkipDelete(value bool) BuildRunOption
SkipDelete sets whether or not the resources like build, buildrun and output image should be cleaned up
type KubeAccess ¶
type KubeAccess struct { Context context.Context RestConfig *rest.Config Client kubernetes.Interface BuildClient buildclient.Interface TektonClient tektonclient.Interface }
KubeAccess contains Kubernetes cluster access objects in a single place
func NewKubeAccess ¶
func NewKubeAccess() (*KubeAccess, error)
NewKubeAccess creates a new kubernetes access handle
type NamingConfig ¶ added in v0.3.0
NamingConfig contains all fields required for proper naming of buildRuns
type Result ¶ added in v0.5.0
type Result []Value
Result contains the raw time results
func ExecuteBuilds ¶ added in v0.5.0
func ExecuteBuilds(kubeAccess KubeAccess, namingCfg NamingConfig, buildCfg BuildConfig, count int) ([]Result, error)
ExecuteBuilds creates a number of builds and waits for them to be registered
func ExecuteParallelBuildRuns ¶
func ExecuteParallelBuildRuns(kubeAccess KubeAccess, namingCfg NamingConfig, buildCfg BuildConfig, parallel int) ([]Result, error)
ExecuteParallelBuildRuns executes the same buildrun multiple times in parallel
func ExecuteSingleBuildRun ¶
func ExecuteSingleBuildRun(kubeAccess KubeAccess, namespace string, name string, buildSpec buildv1alpha1.BuildSpec, buildAnnotations map[string]string, options ...BuildRunOption) (*Result, error)
ExecuteSingleBuildRun executes a single buildrun based on the given settings
type ResultSet ¶ added in v0.5.0
type ResultSet struct { EntityType string NumberOfResults int Minimum Result Maximum Result Mean Result Median Result }
ResultSet is an aggregated result set based on multiple results
func CalculateResultSet ¶ added in v0.5.0
CalculateResultSet creates a result set using a list of results to get the minimum, mean, median, and maximum results
func ExecuteSeriesOfParallelBuildRuns ¶
func ExecuteSeriesOfParallelBuildRuns(kubeAccess KubeAccess, namingCfg NamingConfig, buildCfg BuildConfig, start int, end int, increment int) ([]ResultSet, error)
ExecuteSeriesOfParallelBuildRuns executes a series of parallel buildruns increasing the number of parallel buildruns with each interation
type TestPlan ¶ added in v0.2.0
type TestPlan struct { Namespace string `yaml:"namespace" json:"namespace"` ServiceAccountName string `yaml:"serviceAccountName" json:"serviceAccountName"` Steps []struct { Name string `yaml:"name" json:"name"` BuildAnnotations map[string]string `yaml:"buildAnnotations" json:"buildAnnotations"` BuildSpec buildv1alpha.BuildSpec `yaml:"buildSpec" json:"buildSpec"` } `yaml:"steps" json:"steps"` }
TestPlan is a plan with steps that define tests