diff --git a/cmd/drone-server/drone.go b/cmd/drone-server/drone.go index 8f80ea6fb..151812d87 100644 --- a/cmd/drone-server/drone.go +++ b/cmd/drone-server/drone.go @@ -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" diff --git a/pkg/config/config.go b/pkg/config/config.go index 8f7d96343..e68bf38fb 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -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 diff --git a/pkg/remote/github/github.go b/pkg/remote/builtin/github/github.go similarity index 100% rename from pkg/remote/github/github.go rename to pkg/remote/builtin/github/github.go diff --git a/pkg/remote/github/helper.go b/pkg/remote/builtin/github/helper.go similarity index 100% rename from pkg/remote/github/helper.go rename to pkg/remote/builtin/github/helper.go