mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-30 08:06:52 +02:00
upgrade go1.3 and irc library
This commit is contained in:
parent
5eb0aab517
commit
3493b868ef
@ -22,4 +22,4 @@ publish:
|
||||
access_key: $AWS_KEY
|
||||
secret_key: $AWS_SECRET
|
||||
source: debian/drone.deb
|
||||
target: $DRONE_BRANCH/
|
||||
target: $DRONE_BRANCH/
|
||||
|
@ -17,18 +17,18 @@ type IRC struct {
|
||||
Channel string `yaml:"channel,omitempty"`
|
||||
Nick string `yaml:"nick,omitempty"`
|
||||
Server string `yaml:"server,omitempty"`
|
||||
Started bool `yaml:"on_started,omitempty"`
|
||||
Success bool `yaml:"on_success,omitempty"`
|
||||
Failure bool `yaml:"on_failure,omitempty"`
|
||||
Started *bool `yaml:"on_started,omitempty"`
|
||||
Success *bool `yaml:"on_success,omitempty"`
|
||||
Failure *bool `yaml:"on_failure,omitempty"`
|
||||
}
|
||||
|
||||
func (i *IRC) Send(req *model.Request) error {
|
||||
switch {
|
||||
case req.Commit.Status == "Started" && i.Started:
|
||||
case req.Commit.Status == "Started" && i.Started != nil && *i.Started == true:
|
||||
return i.sendStarted(req)
|
||||
case req.Commit.Status == "Success" && i.Success:
|
||||
case req.Commit.Status == "Success" && i.Success != nil && *i.Success == true:
|
||||
return i.sendSuccess(req)
|
||||
case req.Commit.Status == "Failure" && i.Failure:
|
||||
case req.Commit.Status == "Failure" && i.Failure != nil && *i.Failure == true:
|
||||
return i.sendFailure(req)
|
||||
}
|
||||
return nil
|
||||
|
@ -197,6 +197,7 @@ var builders = map[string]*image{
|
||||
"go1": {Tag: "bradrydzewski/go:1.0"},
|
||||
"go1.1": {Tag: "bradrydzewski/go:1.1"},
|
||||
"go1.2": {Tag: "bradrydzewski/go:1.2"},
|
||||
"go1.3": {Tag: "bradrydzewski/go:1.3"},
|
||||
|
||||
// Haskell build images
|
||||
"haskell": {Tag: "bradrydzewski/haskell:7.4"},
|
||||
|
Loading…
Reference in New Issue
Block a user