Documentation ¶
Index ¶
- func GenerateNotificationConfigForAlerting(tr []*tmv1beta1.Testrun, concourseOnErrorDir string)
- func MarkTestrunsAsUploadedToGithub(log logr.Logger, tmClient client.Client, runs testrunner.RunList) error
- func UploadStatusToGithub(log logr.Logger, runs testrunner.RunList, ...) error
- type AssetOverview
- type AssetOverviewItem
- type Collector
- type ComponentExtended
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateNotificationConfigForAlerting ¶
GenerateNotificationConfigForAlerting creates a notification config file with email recipients if any test step has failed The config file is then evaluated by Concourse
func MarkTestrunsAsUploadedToGithub ¶
func MarkTestrunsAsUploadedToGithub(log logr.Logger, tmClient client.Client, runs testrunner.RunList) error
MarkTestrunsAsIngested sets the ingest status of testruns to true
func UploadStatusToGithub ¶
func UploadStatusToGithub(log logr.Logger, runs testrunner.RunList, components []*componentdescriptor.Component, githubUser, githubPassword, assetPrefix string) error
uploads status results as assets to github component releases
Types ¶
type AssetOverview ¶
type AssetOverview struct {
AssetOverviewItems []AssetOverviewItem
}
func DownloadAssetOverview ¶
func DownloadAssetOverview(log logr.Logger, component ComponentExtended, overviewFilepath string) (AssetOverview, error)
DownloadAssetOverview downloads and parses the asset overview from a component from github
func (AssetOverview) Contains ¶
func (overview AssetOverview) Contains(searchAssetName string) bool
func (AssetOverview) Get ¶
func (overview AssetOverview) Get(assetName string) *AssetOverviewItem
type AssetOverviewItem ¶
type Collector ¶
type Collector struct { // RunExecCh is called when a new testrun is executed RunExecCh chan *testrunner.Run // contains filtered or unexported fields }
type ComponentExtended ¶
type ComponentExtended struct { PlainURL string Version string GithubClient *github.Client Owner string Name string GithubReleaseID int64 }
func EnhanceComponent ¶
func EnhanceComponent(component *componentdescriptor.Component, githubUser string, githubPassword string) (ComponentExtended, error)
EnhanceComponent wraps component struct with additional github properties: github client, repo owner, repo name, release ID
type Config ¶
type Config struct { // OutputDir is the path where the testresults are written to. OutputDir string // Path to the error directory of concourse to put the notify.cfg in. ConcourseOnErrorDir string // ComponentDescriptorPath path to the component descriptor file ComponentDescriptorPath string // Repository specifies the repository used to resolve the component references of the component specified in // ComponentDescriptorPath Repository string // OCMConfigPath is the path to the .ocmconfig file // Per default, the file is expected to be at $HOME/.ocmconfig OCMConfigPath string // AssetComponents indicates to upload the testrun status to the github component as an asset AssetComponents []string // GithubUser to allow getting a github client GithubUser string GithubPassword string // UploadStatusAsset states whether the testrun status should be uploaded as a github release asset UploadStatusAsset bool // AssetPrefix defines the asset name prefix AssetPrefix string // ConcourseURL provides the concourse URL as reference for testruns summary results ConcourseURL string // GrafanaURL provides the grafana dashboard URL for test results GrafanaURL string // SlackToken is the slack token for slack API operations SlackToken string // SlackChannel defines in which slack channel the testruns summary shall be posted SlackChannel string // PostSummaryInSlack states whether the summary of testruns shall be posted in slack PostSummaryInSlack bool }
Config represents the configuration for collecting and storing results from a testrun.
Click to show internal directories.
Click to hide internal directories.