Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
6585c5184a
5 changed files with 22 additions and 4 deletions
|
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- specify a user for the pipeline step, by [@bradrydzewski](https://github.com/bradrydzewski). [#2651](https://github.com/drone/drone/issues/2651).
|
- specify a user for the pipeline step, by [@bradrydzewski](https://github.com/bradrydzewski). [#2651](https://github.com/drone/drone/issues/2651).
|
||||||
- update drone-yaml to version 1.0.7.
|
- update drone-yaml to version 1.0.7.
|
||||||
- update drone-runtime to version 1.0.5.
|
- update drone-runtime to version 1.0.5.
|
||||||
|
- add sign in with Gitea OAuth, by [@techknowlogick](https://github.com/techknowlogick). [#2622](https://github.com/drone/drone/pull/2622).
|
||||||
|
|
||||||
## [1.0.1] - 2019-04-10
|
## [1.0.1] - 2019-04-10
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -299,9 +299,12 @@ type (
|
||||||
|
|
||||||
// Gitea provides the gitea client configuration.
|
// Gitea provides the gitea client configuration.
|
||||||
Gitea struct {
|
Gitea struct {
|
||||||
Server string `envconfig:"DRONE_GITEA_SERVER"`
|
Server string `envconfig:"DRONE_GITEA_SERVER"`
|
||||||
SkipVerify bool `envconfig:"DRONE_GITEA_SKIP_VERIFY"`
|
ClientID string `envconfig:"DRONE_GITEA_CLIENT_ID"`
|
||||||
Debug bool `envconfig:"DRONE_GITEA_DEBUG"`
|
ClientSecret string `envconfig:"DRONE_GITEA_CLIENT_SECRET"`
|
||||||
|
SkipVerify bool `envconfig:"DRONE_GITEA_SKIP_VERIFY"`
|
||||||
|
Scope []string `envconfig:"DRONE_GITEA_SCOPE" default:"repo,repo:status,user:email,read:org"`
|
||||||
|
Debug bool `envconfig:"DRONE_GITEA_DEBUG"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Github provides the github client configuration.
|
// Github provides the github client configuration.
|
||||||
|
|
|
@ -18,6 +18,7 @@ import (
|
||||||
"github.com/drone/drone/cmd/drone-server/config"
|
"github.com/drone/drone/cmd/drone-server/config"
|
||||||
"github.com/drone/go-login/login"
|
"github.com/drone/go-login/login"
|
||||||
"github.com/drone/go-login/login/bitbucket"
|
"github.com/drone/go-login/login/bitbucket"
|
||||||
|
"github.com/drone/go-login/login/gitea"
|
||||||
"github.com/drone/go-login/login/github"
|
"github.com/drone/go-login/login/github"
|
||||||
"github.com/drone/go-login/login/gitlab"
|
"github.com/drone/go-login/login/gitlab"
|
||||||
"github.com/drone/go-login/login/gogs"
|
"github.com/drone/go-login/login/gogs"
|
||||||
|
@ -91,6 +92,17 @@ func provideGiteaLogin(config config.Config) login.Middleware {
|
||||||
if config.Gitea.Server == "" {
|
if config.Gitea.Server == "" {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
if config.Gitea.ClientID != "" {
|
||||||
|
return &gitea.Config {
|
||||||
|
ClientID: config.Gitea.ClientID,
|
||||||
|
ClientSecret: config.Gitea.ClientSecret,
|
||||||
|
Server: config.Gitea.Server,
|
||||||
|
Client: defaultClient(config.Gitea.SkipVerify),
|
||||||
|
Logger: logrus.StandardLogger(),
|
||||||
|
RedirectURL: config.Server.Addr + "/login",
|
||||||
|
Scope: config.Gitea.Scope,
|
||||||
|
}
|
||||||
|
}
|
||||||
return &gogs.Config{
|
return &gogs.Config{
|
||||||
Label: "drone",
|
Label: "drone",
|
||||||
Login: "/login/form",
|
Login: "/login/form",
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -21,7 +21,7 @@ require (
|
||||||
github.com/drone/drone-yaml v1.0.7
|
github.com/drone/drone-yaml v1.0.7
|
||||||
github.com/drone/envsubst v1.0.1
|
github.com/drone/envsubst v1.0.1
|
||||||
github.com/drone/go-license v1.0.2
|
github.com/drone/go-license v1.0.2
|
||||||
github.com/drone/go-login v1.0.3
|
github.com/drone/go-login v1.0.4-0.20190311170324-2a4df4f242a2
|
||||||
github.com/drone/go-scm v1.3.0
|
github.com/drone/go-scm v1.3.0
|
||||||
github.com/drone/signal v1.0.0
|
github.com/drone/signal v1.0.0
|
||||||
github.com/dustin/go-humanize v1.0.0
|
github.com/dustin/go-humanize v1.0.0
|
||||||
|
|
2
go.sum
2
go.sum
|
@ -61,6 +61,8 @@ github.com/drone/go-license v1.0.2 h1:7OwndfYk+Lp/cGHkxe4HUn/Ysrrw3WYH2pnd99yrko
|
||||||
github.com/drone/go-license v1.0.2/go.mod h1:fGRHf+F1cEaw3YVYiJ6js3G3dVhcxyS617RnNRUMsms=
|
github.com/drone/go-license v1.0.2/go.mod h1:fGRHf+F1cEaw3YVYiJ6js3G3dVhcxyS617RnNRUMsms=
|
||||||
github.com/drone/go-login v1.0.3 h1:YmZMUoWWd3QrgmobC1DcExFjW7w2ZEBO1R1VeeobIRU=
|
github.com/drone/go-login v1.0.3 h1:YmZMUoWWd3QrgmobC1DcExFjW7w2ZEBO1R1VeeobIRU=
|
||||||
github.com/drone/go-login v1.0.3/go.mod h1:FLxy9vRzLbyBxoCJYxGbG9R0WGn6OyuvBmAtYNt43uw=
|
github.com/drone/go-login v1.0.3/go.mod h1:FLxy9vRzLbyBxoCJYxGbG9R0WGn6OyuvBmAtYNt43uw=
|
||||||
|
github.com/drone/go-login v1.0.4-0.20190308175602-213d1719faed h1:Y0qiKFf6gsgTRTQS1roMh7kKVyrx+HSQmFsIgcZsHsM=
|
||||||
|
github.com/drone/go-login v1.0.4-0.20190308175602-213d1719faed/go.mod h1:FLxy9vRzLbyBxoCJYxGbG9R0WGn6OyuvBmAtYNt43uw=
|
||||||
github.com/drone/go-scm v1.2.0 h1:ezb8xCvMHX99cSOf3WPI2bmYS6tDVTTap9BiPsPmmXg=
|
github.com/drone/go-scm v1.2.0 h1:ezb8xCvMHX99cSOf3WPI2bmYS6tDVTTap9BiPsPmmXg=
|
||||||
github.com/drone/go-scm v1.2.0/go.mod h1:YT4FxQ3U/ltdCrBJR9B0tRpJ1bYA/PM3NyaLE/rYIvw=
|
github.com/drone/go-scm v1.2.0/go.mod h1:YT4FxQ3U/ltdCrBJR9B0tRpJ1bYA/PM3NyaLE/rYIvw=
|
||||||
github.com/drone/go-scm v1.3.0 h1:XXg2X8GhSvJRr4RTu40t2o9XUa1WXK7BWzK0AVQHygM=
|
github.com/drone/go-scm v1.3.0 h1:XXg2X8GhSvJRr4RTu40t2o9XUa1WXK7BWzK0AVQHygM=
|
||||||
|
|
Loading…
Reference in a new issue