mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 03:41:01 +00:00
ability to package 0.4 (.deb only at the moment)
This commit is contained in:
parent
d688121844
commit
d34cd6e5e9
5 changed files with 11 additions and 43 deletions
|
@ -95,6 +95,7 @@ func main() {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
settings.Plugins = []string{conf.plugin.filter} // todo hack
|
||||
|
||||
store, err := store.New(conf.database.driver, conf.database.config)
|
||||
if err != nil {
|
||||
|
@ -106,7 +107,7 @@ func main() {
|
|||
panic(err)
|
||||
}
|
||||
|
||||
session := session.New(settings)
|
||||
session := session.New(conf.remote.config)
|
||||
eventbus_ := eventbus.New()
|
||||
queue_ := queue.New()
|
||||
updater := runner.NewUpdater(eventbus_, store, remote)
|
||||
|
|
2
dist/drone/DEBIAN/conffiles
vendored
2
dist/drone/DEBIAN/conffiles
vendored
|
@ -1,2 +1,2 @@
|
|||
/etc/init/drone.conf
|
||||
/etc/drone/drone.toml
|
||||
/etc/drone/dronerc
|
||||
|
|
36
dist/drone/etc/drone/drone.toml
vendored
36
dist/drone/etc/drone/drone.toml
vendored
|
@ -1,36 +0,0 @@
|
|||
[server]
|
||||
addr = ":80"
|
||||
cert = ""
|
||||
key = ""
|
||||
|
||||
# [session]
|
||||
# secret = ""
|
||||
# expires = ""
|
||||
|
||||
[database]
|
||||
driver="sqlite3"
|
||||
datasource="/var/lib/drone/drone.sqlite"
|
||||
|
||||
[docker]
|
||||
cert = ""
|
||||
key = ""
|
||||
addr = "unix:///var/run/docker.sock"
|
||||
swarm = ""
|
||||
|
||||
# [remote]
|
||||
# kind = "github"
|
||||
# base = "https://github.com"
|
||||
# orgs = []
|
||||
# open = false
|
||||
# private = false
|
||||
# skip_verify = true
|
||||
|
||||
# [auth]
|
||||
# client = ""
|
||||
# secret = ""
|
||||
# authorize = "https://github.com/login/oauth/authorize"
|
||||
# access_token = "https://github.com/login/oauth/access_token"
|
||||
# request_token = ""
|
||||
|
||||
# [agents]
|
||||
# secret = ""
|
6
dist/drone/etc/init/drone.conf
vendored
6
dist/drone/etc/init/drone.conf
vendored
|
@ -4,5 +4,9 @@ chdir /var/lib/drone
|
|||
console log
|
||||
|
||||
script
|
||||
drone --config /etc/drone/drone.toml
|
||||
set -a
|
||||
if [ -f /etc/drone/dronerc ]; then
|
||||
. /etc/drone/dronerc
|
||||
fi
|
||||
/usr/local/bin/drone
|
||||
end script
|
|
@ -6,7 +6,6 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/drone/drone/Godeps/_workspace/src/github.com/dgrijalva/jwt-go"
|
||||
"github.com/drone/drone/pkg/config"
|
||||
common "github.com/drone/drone/pkg/types"
|
||||
)
|
||||
|
||||
|
@ -20,8 +19,8 @@ type session struct {
|
|||
expire time.Duration
|
||||
}
|
||||
|
||||
func New(s *config.Config) Session {
|
||||
secret := []byte(s.Session.Secret)
|
||||
func New(rand string) Session {
|
||||
secret := []byte(rand)
|
||||
expire := time.Hour * 72
|
||||
return &session{
|
||||
secret: secret,
|
||||
|
|
Loading…
Reference in a new issue