Remove Notifications from Jenkins API

This commit is contained in:
Tomasz Sęk 2019-09-03 14:15:30 +02:00
parent 204ea3f6b2
commit 31536d0339
No known key found for this signature in database
GPG Key ID: DC356D23F6A644D0
3 changed files with 5 additions and 17 deletions

View File

@ -17,9 +17,9 @@ type JenkinsSpec struct {
// +optional
SeedJobs []SeedJob `json:"seedJobs,omitempty"`
// Notifications defines list of a services which are used to inform about Jenkins status
// Can be used to integrate chat services like Slack, Microsoft MicrosoftTeams or Mailgun
Notifications []Notification `json:"notifications,omitempty"`
/* // Notifications defines list of a services which are used to inform about Jenkins status
// Can be used to integrate chat services like Slack, Microsoft MicrosoftTeams or Mailgun
Notifications []Notification `json:"notifications,omitempty"`*/
// Service is Kubernetes service of Jenkins master HTTP pod
// Defaults to :

View File

@ -342,13 +342,6 @@ func (in *JenkinsSpec) DeepCopyInto(out *JenkinsSpec) {
*out = make([]SeedJob, len(*in))
copy(*out, *in)
}
if in.Notifications != nil {
in, out := &in.Notifications, &out.Notifications
*out = make([]Notification, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
in.Service.DeepCopyInto(&out.Service)
in.SlaveService.DeepCopyInto(&out.SlaveService)
in.Backup.DeepCopyInto(&out.Backup)

View File

@ -1,14 +1,9 @@
package notifications
import (
"fmt"
"github.com/pkg/errors"
"net/http"
"github.com/jenkinsci/kubernetes-operator/pkg/apis/jenkins/v1alpha2"
"github.com/jenkinsci/kubernetes-operator/pkg/log"
k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
)
const (
@ -47,7 +42,7 @@ type Event struct {
MessageVerbose string
}
type service interface {
/*type service interface {
Send(event Event, notificationConfig v1alpha2.Notification) error
}
@ -92,4 +87,4 @@ func notify(svc service, event Event, manifest v1alpha2.Notification) error {
}
return svc.Send(event, manifest)
}
}*/