Documentation ¶
Index ¶
- Variables
- func GetStdInputArtifacts() []argov1.Artifact
- func GetStdOutputArtifacts(global bool) []argov1.Artifact
- func GetUntrustedInputArtifacts() []argov1.Artifact
- type ArtifactSet
- type GitInfo
- type Location
- type TestDefinition
- func (td *TestDefinition) AddAnnotation(key, value string)
- func (td *TestDefinition) AddConfig(configs []*config.Element)
- func (td *TestDefinition) AddEnvVars(envs ...apiv1.EnvVar)
- func (td *TestDefinition) AddInputArtifacts(artifacts ...argov1alpha1.Artifact)
- func (td *TestDefinition) AddInputParameter(name, value string)
- func (td *TestDefinition) AddOutputArtifacts(artifacts ...argov1alpha1.Artifact)
- func (td *TestDefinition) AddStdOutput(global bool)
- func (td *TestDefinition) AddVolume(volume apiv1.Volume)
- func (td *TestDefinition) AddVolumeFromConfig(cfg *config.Element) error
- func (td *TestDefinition) AddVolumeMount(name, path, subpath string, readOnly bool)
- func (td *TestDefinition) Copy() *TestDefinition
- func (td *TestDefinition) GetConfig() config.Set
- func (td *TestDefinition) GetName() string
- func (td *TestDefinition) GetTemplate() (*argov1alpha1.Template, error)
- func (td *TestDefinition) HasBehavior(behavior string) bool
- func (td *TestDefinition) HasLabel(label string) bool
- func (td *TestDefinition) SetName(name string)
- func (td *TestDefinition) SetSuspend()
Constants ¶
This section is empty.
Variables ¶
var (
DefaultActiveDeadlineSeconds = intstr.FromInt(600)
)
Functions ¶
func GetStdInputArtifacts ¶
GetStdInputArtifacts returns the default input artifacts of testdefionitions. The artifacts include kubeconfigs and shared folder inputs
func GetStdOutputArtifacts ¶
GetStdOutputArtifacts returns the default output artifacts of a step. These artifacts include kubeconfigs and the shared folder.
func GetUntrustedInputArtifacts ¶
GetUntrustedInputArtifacts returns the untrusted input artifacts of testdefionitions. The artifacts only include minimal configuration
Types ¶
type ArtifactSet ¶
type ArtifactSet map[string]empty
func (ArtifactSet) Add ¶
func (s ArtifactSet) Add(key string)
func (ArtifactSet) Copy ¶
func (s ArtifactSet) Copy() ArtifactSet
func (ArtifactSet) Has ¶
func (s ArtifactSet) Has(key string) bool
type Location ¶
type Location interface { // SetTestDefs adds Testdefinitions to the map. SetTestDefs(map[string]*TestDefinition) error // Type returns the tmv1beta1.LocationType type. Type() tmv1beta1.LocationType // Name returns the unique name of the location. Name() string // GetLocation returns the original TestLocation object GetLocation() *tmv1beta1.TestLocation // GitInfo returns the current git information GitInfo() GitInfo }
Location is an interface for different testDefLocation types like git or local
type TestDefinition ¶
type TestDefinition struct { Info *tmv1beta1.TestDefinition Location Location FileName string Template *argov1.Template Volumes []apiv1.Volume // contains filtered or unexported fields }
TestDefinition represents a TestDefinition which was fetched from locations.
func New ¶
func New(def *tmv1beta1.TestDefinition, loc Location, fileName string) (*TestDefinition, error)
New takes a CRD TestDefinition and its locations, and creates a TestDefinition object.
func NewEmpty ¶
func NewEmpty() *TestDefinition
func (*TestDefinition) AddAnnotation ¶
func (td *TestDefinition) AddAnnotation(key, value string)
GetAnnotations returns Template annotations for a testdefinition
func (*TestDefinition) AddConfig ¶
func (td *TestDefinition) AddConfig(configs []*config.Element)
AddConfig adds the config elements of different types (environment variable) to the TestDefinitions's template.
func (*TestDefinition) AddEnvVars ¶
func (td *TestDefinition) AddEnvVars(envs ...apiv1.EnvVar)
AddEnvVars adds environment variables to the container of the TestDefinition's template.
func (*TestDefinition) AddInputArtifacts ¶
func (td *TestDefinition) AddInputArtifacts(artifacts ...argov1alpha1.Artifact)
AddInputArtifacts adds argo artifacts to the input of the TestDefinitions's template.
func (*TestDefinition) AddInputParameter ¶
func (td *TestDefinition) AddInputParameter(name, value string)
AddInputParameter adds a parameter to the input of the TestDefinitions's template.
func (*TestDefinition) AddOutputArtifacts ¶
func (td *TestDefinition) AddOutputArtifacts(artifacts ...argov1alpha1.Artifact)
AddOutputArtifacts adds argo artifacts to the output of the TestDefinitions's template.
func (*TestDefinition) AddStdOutput ¶
func (td *TestDefinition) AddStdOutput(global bool)
AddStdOutput adds the Kubeconfig output to the TestDefinitions's template.
func (*TestDefinition) AddVolume ¶
func (td *TestDefinition) AddVolume(volume apiv1.Volume)
AddVolume adds a volume to a TestDefinitions's template.
func (*TestDefinition) AddVolumeFromConfig ¶
func (td *TestDefinition) AddVolumeFromConfig(cfg *config.Element) error
func (*TestDefinition) AddVolumeMount ¶
func (td *TestDefinition) AddVolumeMount(name, path, subpath string, readOnly bool)
AddVolumeMount adds a mount to the container of the TestDefinitions's template.
func (*TestDefinition) Copy ¶
func (td *TestDefinition) Copy() *TestDefinition
New returns a deep copy of the TestDefinition.
func (*TestDefinition) GetConfig ¶
func (td *TestDefinition) GetConfig() config.Set
func (*TestDefinition) GetName ¶
func (td *TestDefinition) GetName() string
func (*TestDefinition) GetTemplate ¶
func (td *TestDefinition) GetTemplate() (*argov1alpha1.Template, error)
func (*TestDefinition) HasBehavior ¶
func (td *TestDefinition) HasBehavior(behavior string) bool
HasBehavior checks if the testrun has defined a specific behavior like serial or disruptiv.
func (*TestDefinition) HasLabel ¶
func (td *TestDefinition) HasLabel(label string) bool
HasLabel checks if the TestDefinition has a specific label. (Group in testdef)
func (*TestDefinition) SetName ¶
func (td *TestDefinition) SetName(name string)
func (*TestDefinition) SetSuspend ¶
func (td *TestDefinition) SetSuspend()