mirror of
https://github.com/jenkinsci/kubernetes-operator.git
synced 2026-10-22 07:02:58 +02:00
Initial version of jobs API
This commit is contained in:
@@ -31,6 +31,18 @@ type JenkinsStatus struct {
|
||||
// Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
|
||||
BaseConfigurationCompletedTime *metav1.Time `json:"baseConfigurationCompletedTime,omitempty"`
|
||||
UserConfigurationCompletedTime *metav1.Time `json:"userConfigurationCompletedTime,omitempty"`
|
||||
Builds []Build `json:"builds,omitempty"`
|
||||
}
|
||||
|
||||
// Build defines Jenkins Build status with corresponding metadata
|
||||
type Build struct {
|
||||
Name string `json:"name,omitempty"`
|
||||
Hash string `json:"hash,omitempty"`
|
||||
Number int64 `json:"number,omitempty"`
|
||||
Status string `json:"status,omitempty"` // from https://javadoc.jenkins-ci.org/hudson/model/Result.html
|
||||
Retires int `json:"retries,omitempty"`
|
||||
CreateTime *metav1.Time `json:"createTime,omitempty"`
|
||||
LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
@@ -25,6 +25,30 @@ import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Build) DeepCopyInto(out *Build) {
|
||||
*out = *in
|
||||
if in.CreateTime != nil {
|
||||
in, out := &in.CreateTime, &out.CreateTime
|
||||
*out = (*in).DeepCopy()
|
||||
}
|
||||
if in.LastUpdateTime != nil {
|
||||
in, out := &in.LastUpdateTime, &out.LastUpdateTime
|
||||
*out = (*in).DeepCopy()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Build.
|
||||
func (in *Build) DeepCopy() *Build {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Build)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Jenkins) DeepCopyInto(out *Jenkins) {
|
||||
*out = *in
|
||||
@@ -160,6 +184,13 @@ func (in *JenkinsStatus) DeepCopyInto(out *JenkinsStatus) {
|
||||
in, out := &in.UserConfigurationCompletedTime, &out.UserConfigurationCompletedTime
|
||||
*out = (*in).DeepCopy()
|
||||
}
|
||||
if in.Builds != nil {
|
||||
in, out := &in.Builds, &out.Builds
|
||||
*out = make([]Build, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user