hipchat support (#593)

* first commit

* hipchat conf

* hipchat conf
This commit is contained in:
kazuminn
2018-03-06 17:40:21 +09:00
committed by Kota Kanbe
parent 092a19bdc1
commit 26418be937
5 changed files with 108 additions and 0 deletions

View File

@@ -57,6 +57,7 @@ type ReportCmd struct {
ovalDBURL string
toSlack bool
toHipChat bool
toEMail bool
toSyslog bool
toLocalFile bool
@@ -114,6 +115,7 @@ func (*ReportCmd) Usage() string {
[-ignore-unfixed]
[-to-email]
[-to-slack]
[-to-hipchat]
[-to-localfile]
[-to-s3]
[-to-azure-blob]
@@ -264,6 +266,7 @@ func (p *ReportCmd) SetFlags(f *flag.FlagSet) {
f.BoolVar(&p.gzip, "gzip", false, "gzip compression")
f.BoolVar(&p.toSlack, "to-slack", false, "Send report via Slack")
f.BoolVar(&p.toHipChat, "to-hipchat", false, "Send report via hipchat")
f.BoolVar(&p.toEMail, "to-email", false, "Send report via Email")
f.BoolVar(&p.toSyslog, "to-syslog", false, "Send report via Syslog")
f.BoolVar(&p.toLocalFile,
@@ -361,6 +364,10 @@ func (p *ReportCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}
reports = append(reports, report.SlackWriter{})
}
if p.toHipChat {
reports = append(reports, report.HipChatWriter{})
}
if p.toEMail {
reports = append(reports, report.EMailWriter{})
}