Documentation ¶
Index ¶
- func CheckSystemAndConfig(kubeAccess KubeAccess, buildCfg BuildConfig, parallel int) error
- func CreateChartJS(filename string, data []BuildRunResultSet) error
- func ExecuteTestPlan(kubeAccess KubeAccess, testplan TestPlan) error
- type BuildConfig
- type BuildRunResult
- type BuildRunResultSet
- type KubeAccess
- type NamingConfig
- type TestPlan
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 CreateChartJS ¶
func CreateChartJS(filename string, data []BuildRunResultSet) error
CreateChartJS creates a page with ChartsJS to render the provided results
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 SourceContextDir string SourceSecretRef string SourceDockerfile string OutputImageURL string OutputSecretRef string }
BuildConfig contains all fields required to setup a buildRun
type BuildRunResult ¶
type BuildRunResult struct { TotalBuildRunTime time.Duration BuildRunRampUpDuration time.Duration TaskRunRampUpDuration time.Duration PodRampUpDuration time.Duration InternalProcessingTime time.Duration }
BuildRunResult contains the raw time results of a buildrun
func ExecuteParallelBuildRuns ¶
func ExecuteParallelBuildRuns(kubeAccess KubeAccess, namingCfg NamingConfig, buildCfg BuildConfig, parallel int) ([]BuildRunResult, error)
ExecuteParallelBuildRuns executes the same buildrun multiple times in parallel
func ExecuteSingleBuildRun ¶
func ExecuteSingleBuildRun(kubeAccess KubeAccess, namespace string, name string, buildSpec buildv1alpha1.BuildSpec) (*BuildRunResult, error)
ExecuteSingleBuildRun executes a single buildrun based on the given settings
type BuildRunResultSet ¶
type BuildRunResultSet struct { NumberOfResults int Minimum BuildRunResult Maximum BuildRunResult Mean BuildRunResult Median BuildRunResult }
BuildRunResultSet is an aggregated result set based on multiple buildrun results
func CalculateBuildRunResultSet ¶
func CalculateBuildRunResultSet(results []BuildRunResult) BuildRunResultSet
CalculateBuildRunResultSet creates a buildrun result set using a list of buildrun 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) ([]BuildRunResultSet, error)
ExecuteSeriesOfParallelBuildRuns executes a series of parallel buildruns increasing the number of parallel buildruns with each interation
func (BuildRunResultSet) String ¶
func (brs BuildRunResultSet) String() string
type KubeAccess ¶
type KubeAccess struct { 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 TestPlan ¶ added in v0.2.0
type TestPlan struct { Namespace string `yaml:"namespace" json:"namespace"` Steps []struct { Name string `yaml:"name" json:"name"` BuildSpec buildv1alpha.BuildSpec `yaml:"buildSpec" json:"buildSpec"` } `yaml:"steps" json:"steps"` }
TestPlan is a plan with steps that define tests