Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the kubetest v1 API group +kubebuilder:object:generate=true +groupName=kubetest.io
Index ¶
- Variables
- type CacheSpec
- type Command
- type DistributedTestListSpec
- type DistributedTestRetestSpec
- type DistributedTestSpec
- type GitSpec
- type LogSpec
- type PrepareSpec
- type PrepareStepSpec
- type TestJob
- type TestJobList
- type TestJobRunner
- func (r *TestJobRunner) DisableCommandLog()
- func (r *TestJobRunner) DisablePrepareLog()
- func (r *TestJobRunner) DisableResultLog()
- func (r *TestJobRunner) Run(ctx context.Context, testjob TestJob) error
- func (r *TestJobRunner) SetLogger(logger func(*kubejob.ContainerLog))
- func (r *TestJobRunner) SetToken(token string)
- type TestJobSecretKeyRef
- type TestJobSpec
- type TestJobStatus
- type TestJobToken
- type TestLog
- type TestResult
- type TestResultLog
- type TestResultLogDetail
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "kubetest.io", Version: "v1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
var (
ErrFailedTestJob = xerrors.New("failed test job")
)
Functions ¶
This section is empty.
Types ¶
type CacheSpec ¶ added in v0.2.0
type CacheSpec struct { // Name cache identifier Name string `json:"name"` // Command for making cache Command Command `json:"command"` // Path specify mount path Path string `json:"path"` }
func (*CacheSpec) DeepCopy ¶ added in v0.2.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CacheSpec.
func (*CacheSpec) DeepCopyInto ¶ added in v0.2.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DistributedTestListSpec ¶ added in v0.2.8
type DistributedTestListSpec struct { Command []string `json:"command"` Args []string `json:"args"` // Delimiter for testing list ( default: new line character ( \n ) ) Delimiter string `json:"delimiter,omitempty"` // Test name pattern ( enable use regular expression ) Pattern string `json:"pattern,omitempty"` }
func (*DistributedTestListSpec) DeepCopy ¶ added in v0.2.8
func (in *DistributedTestListSpec) DeepCopy() *DistributedTestListSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DistributedTestListSpec.
func (*DistributedTestListSpec) DeepCopyInto ¶ added in v0.2.8
func (in *DistributedTestListSpec) DeepCopyInto(out *DistributedTestListSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DistributedTestRetestSpec ¶ added in v0.2.8
type DistributedTestRetestSpec struct { // Enabled restart testing for failed tests Enabled bool `json:"enabled"` // Delimiter for testing list of retest ( default: white space ) Delimiter string `json:"delimiter,omitempty"` }
func (*DistributedTestRetestSpec) DeepCopy ¶ added in v0.2.8
func (in *DistributedTestRetestSpec) DeepCopy() *DistributedTestRetestSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DistributedTestRetestSpec.
func (*DistributedTestRetestSpec) DeepCopyInto ¶ added in v0.2.8
func (in *DistributedTestRetestSpec) DeepCopyInto(out *DistributedTestRetestSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DistributedTestSpec ¶
type DistributedTestSpec struct { // ContainerName container name for running test in template.spec.containers. ContainerName string `json:"containerName"` // MaxContainersPerPod maximum number of container per pod. MaxContainersPerPod int `json:"maxContainersPerPod"` // Output testing list to stdout List DistributedTestListSpec `json:"list"` // Restart testing for failed tests Retest DistributedTestRetestSpec `json:"retest,omitempty"` // CacheSpec for making cache before testing Cache []CacheSpec `json:"cache,omitempty"` }
func (*DistributedTestSpec) DeepCopy ¶
func (in *DistributedTestSpec) DeepCopy() *DistributedTestSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DistributedTestSpec.
func (*DistributedTestSpec) DeepCopyInto ¶
func (in *DistributedTestSpec) DeepCopyInto(out *DistributedTestSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GitSpec ¶ added in v0.2.8
type GitSpec struct { // Image name for clone and checkout by git protocol. Image string `json:"image,omitempty"` // Checkout whether checkout repository before testing ( default: true ). Checkout *bool `json:"checkout,omitempty"` // Repository name. Repo string `json:"repo"` // Branch name. Branch string `json:"branch,omitempty"` // Revision. Rev string `json:"rev,omitempty"` // OAuth token to fetch private repository Token *TestJobToken `json:"token,omitempty"` // CheckoutDir ( default: /git/workspace ) CheckoutDir string `json:"checkoutDir,omitempty"` }
func (*GitSpec) DeepCopy ¶ added in v0.2.8
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitSpec.
func (*GitSpec) DeepCopyInto ¶ added in v0.2.8
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LogSpec ¶ added in v0.2.8
func (*LogSpec) DeepCopy ¶ added in v0.2.8
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogSpec.
func (*LogSpec) DeepCopyInto ¶ added in v0.2.8
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PrepareSpec ¶
type PrepareSpec struct { // Checkout whether checkout repository before testing ( default: true ). Checkout *bool `json:"checkout,omitempty"` Image string `json:"image"` Steps []PrepareStepSpec `json:"steps"` }
func (*PrepareSpec) DeepCopy ¶
func (in *PrepareSpec) DeepCopy() *PrepareSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrepareSpec.
func (*PrepareSpec) DeepCopyInto ¶
func (in *PrepareSpec) DeepCopyInto(out *PrepareSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PrepareStepSpec ¶
type PrepareStepSpec struct { Name string `json:"name"` Image string `json:"image,omitempty"` Command Command `json:"command"` // Workdir ( default: /git/workspace ) Workdir string `json:"workdir,omitempty"` Env []corev1.EnvVar `json:"env,omiempty"` }
func (*PrepareStepSpec) DeepCopy ¶
func (in *PrepareStepSpec) DeepCopy() *PrepareStepSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrepareStepSpec.
func (*PrepareStepSpec) DeepCopyInto ¶
func (in *PrepareStepSpec) DeepCopyInto(out *PrepareStepSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestJob ¶
type TestJob struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec TestJobSpec `json:"spec,omitempty"` Status TestJobStatus `json:"status,omitempty"` }
TestJob is the Schema for the testjobs API
func (*TestJob) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestJob.
func (*TestJob) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TestJob) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TestJobList ¶
type TestJobList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []TestJob `json:"items"` }
TestJobList contains a list of TestJob
func (*TestJobList) DeepCopy ¶
func (in *TestJobList) DeepCopy() *TestJobList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestJobList.
func (*TestJobList) DeepCopyInto ¶
func (in *TestJobList) DeepCopyInto(out *TestJobList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TestJobList) DeepCopyObject ¶
func (in *TestJobList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TestJobRunner ¶
type TestJobRunner struct { *kubernetes.Clientset // contains filtered or unexported fields }
func NewTestJobRunner ¶
func NewTestJobRunner(clientset *kubernetes.Clientset) *TestJobRunner
func (*TestJobRunner) DisableCommandLog ¶
func (r *TestJobRunner) DisableCommandLog()
func (*TestJobRunner) DisablePrepareLog ¶
func (r *TestJobRunner) DisablePrepareLog()
func (*TestJobRunner) DisableResultLog ¶ added in v0.2.0
func (r *TestJobRunner) DisableResultLog()
func (*TestJobRunner) SetLogger ¶
func (r *TestJobRunner) SetLogger(logger func(*kubejob.ContainerLog))
func (*TestJobRunner) SetToken ¶
func (r *TestJobRunner) SetToken(token string)
type TestJobSecretKeyRef ¶
func (*TestJobSecretKeyRef) DeepCopy ¶
func (in *TestJobSecretKeyRef) DeepCopy() *TestJobSecretKeyRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestJobSecretKeyRef.
func (*TestJobSecretKeyRef) DeepCopyInto ¶
func (in *TestJobSecretKeyRef) DeepCopyInto(out *TestJobSecretKeyRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestJobSpec ¶
type TestJobSpec struct { Git GitSpec `json:"git,omitempty"` Template corev1.PodTemplateSpec `json:"template"` // Log extend parameter to output log. Log LogSpec `json:"log,omitempty"` // Prepare steps before testing Prepare PrepareSpec `json:"prepare,omitempty"` // Distributed testing parameter DistributedTest *DistributedTestSpec `json:"distributedTest,omitempty"` }
TestJobSpec defines the desired state of TestJob
func (*TestJobSpec) DeepCopy ¶
func (in *TestJobSpec) DeepCopy() *TestJobSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestJobSpec.
func (*TestJobSpec) DeepCopyInto ¶
func (in *TestJobSpec) DeepCopyInto(out *TestJobSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestJobStatus ¶
type TestJobStatus struct { // Whether the testjob is running Running bool `json:"running,omitempty"` }
TestJobStatus defines the observed state of TestJob
func (*TestJobStatus) DeepCopy ¶
func (in *TestJobStatus) DeepCopy() *TestJobStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestJobStatus.
func (*TestJobStatus) DeepCopyInto ¶
func (in *TestJobStatus) DeepCopyInto(out *TestJobStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestJobToken ¶
type TestJobToken struct {
SecretKeyRef TestJobSecretKeyRef `json:"secretKeyRef"`
}
func (*TestJobToken) DeepCopy ¶
func (in *TestJobToken) DeepCopy() *TestJobToken
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TestJobToken.
func (*TestJobToken) DeepCopyInto ¶
func (in *TestJobToken) DeepCopyInto(out *TestJobToken)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TestLog ¶ added in v0.2.4
type TestLog struct { Name string `json:"name"` TestResult TestResult `json:"testResult"` ElapsedTimeSec int `json:"elapsedTimeSec"` Message string `json:"-"` }
type TestResult ¶ added in v0.2.4
type TestResult string
const ( TestResultSuccess TestResult = "success" TestResultFailure TestResult = "failure" )
type TestResultLog ¶ added in v0.2.0
type TestResultLog struct { TestResult TestResult `json:"testResult"` Job string `json:"job"` ElapsedTimeSec int `json:"elapsedTimeSec"` StartedAt time.Time `json:"startedAt"` Details TestResultLogDetail `json:"details"` }
type TestResultLogDetail ¶ added in v0.2.0
type TestResultLogDetail struct {
Tests []TestLog `json:"tests"`
}