refactor to enable multiple builtin remote plugins
This commit is contained in:
parent
f76dcb1171
commit
70a9a588ba
4 changed files with 34 additions and 1 deletions
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
"github.com/drone/drone/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs"
|
||||
"github.com/drone/drone/pkg/config"
|
||||
"github.com/drone/drone/pkg/remote/github"
|
||||
"github.com/drone/drone/pkg/remote/builtin/github"
|
||||
"github.com/drone/drone/pkg/server"
|
||||
"github.com/drone/drone/pkg/server/session"
|
||||
|
||||
|
|
|
@ -61,6 +61,39 @@ type Config struct {
|
|||
// Plugins represents a white-list of plugins
|
||||
// that the system is authorized to load.
|
||||
Plugins []string `envconfig:"optional"`
|
||||
|
||||
Github struct {
|
||||
Client string `envconfig:"optional"`
|
||||
Secret string `envconfig:"optional"`
|
||||
Orgs []string `envconfig:"optional"`
|
||||
Open bool `envconfig:"optional"`
|
||||
}
|
||||
|
||||
GithubEnterprise struct {
|
||||
URL string `envconfig:"optional"`
|
||||
Client string `envconfig:"optional"`
|
||||
Secret string `envconfig:"optional"`
|
||||
Private bool `envconfig:"optional"`
|
||||
SkipVerify bool `envconfig:"optional"`
|
||||
Open bool `envconfig:"optional"`
|
||||
Orgs []string `envconfig:"optional"`
|
||||
}
|
||||
|
||||
Bitbucket struct {
|
||||
Client string `envconfig:"optional"`
|
||||
Secret string `envconfig:"optional"`
|
||||
Open bool `envconfig:"optional"`
|
||||
Orgs []string `envconfig:"optional"`
|
||||
}
|
||||
|
||||
Gitlab struct {
|
||||
URL string `envconfig:"optional"`
|
||||
Client string `envconfig:"optional"`
|
||||
Secret string `envconfig:"optional"`
|
||||
SkipVerify bool `envconfig:"optional"`
|
||||
Open bool `envconfig:"optional"`
|
||||
Orgs []string `envconfig:"optional"`
|
||||
}
|
||||
}
|
||||
|
||||
// Load loads the configuration file and reads
|
||||
|
|
Loading…
Reference in a new issue