This commit is contained in:
nyyu 2021-05-19 09:31:28 +02:00
parent 367013a179
commit eee014441d
29 changed files with 546 additions and 10070 deletions

19
drone/.SRCINFO Normal file
View file

@ -0,0 +1,19 @@
pkgbase = drone
pkgdesc = Drone is a Continuous Delivery platform built on Docker, written in Go - Free enterprise variant
pkgver = 2.0.0
pkgrel = 1
url = https://drone.io
arch = x86_64
license = Apache
makedepends = go
makedepends = git
makedepends = gcc
backup = etc/drone/server
source = git+https://github.com/drone/drone.git#tag=v2.0.0
source = drone.service
source = server.conf
sha256sums = SKIP
sha256sums = 3cd219b1c5611b9ff4211d4837dff11228d9a491cd41d21f4c60af77c8c21d5c
sha256sums = 2b8957cd6b9f9ee6e8d831f58b0ef3fac2170a56f6259884ec7d30c3ba38c73a
pkgname = drone

37
drone/PKGBUILD Normal file
View file

@ -0,0 +1,37 @@
# Maintainer: Sl@ny <webmaster [at] slany [dot] work>
pkgname=drone
pkgver=2.0.0
pkgrel=1
pkgdesc="Drone is a Continuous Delivery platform built on Docker, written in Go - Free enterprise variant"
arch=('x86_64')
url="https://drone.io"
license=('Apache')
makedepends=('go' 'git' 'gcc')
backup=('etc/drone/server')
source=(git+https://github.com/drone/drone.git#tag=v$pkgver
'drone.service'
'server.conf')
sha256sums=('SKIP'
'3cd219b1c5611b9ff4211d4837dff11228d9a491cd41d21f4c60af77c8c21d5c'
'2b8957cd6b9f9ee6e8d831f58b0ef3fac2170a56f6259884ec7d30c3ba38c73a')
build() {
cd "$srcdir/$pkgname"
go build -a -v -trimpath -buildmode=pie -mod=readonly -tags "nolimit" -ldflags '-w -s' ./cmd/drone-server
}
package() {
cd "$srcdir"
# binaries
install -Dm755 "$pkgname/$pkgname"-server "$pkgdir"/usr/bin/"$pkgname"-server
# license
install -Dm644 "$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# service
install -Dm644 drone.service "$pkgdir/usr/lib/systemd/system/drone.service"
# config
install -Dm644 server.conf "$pkgdir/etc/drone/server"
}

19
drone/drone.service Normal file
View file

@ -0,0 +1,19 @@
[Unit]
Description=Drone Continuous Integration platform server
After=network.target
[Service]
User=drone
Type=simple
EnvironmentFile=/etc/drone/server
ExecStart=/usr/bin/drone-server
ExecReload=/usr/bin/kill -HUP $MAINPID
Restart=on-failure
KillSignal=SIGINT
LimitNOFILE=8192
PrivateDevices=yes
DynamicUser=yes
StateDirectory=drone
[Install]
WantedBy=multi-user.target

26
drone/server.conf Normal file
View file

@ -0,0 +1,26 @@
# drone server configuration
# database configuration
DRONE_DATABASE_DRIVER=sqlite3
DRONE_DATABASE_DATASOURCE=/var/lib/drone/drone.sqlite
# remote configuration
DRONE_GITHUB_CLIENT_ID=""
DRONE_GITHUB_CLIENT_SECRET=""
DRONE_GIT_ALWAYS_AUTH=false
# server
DRONE_SERVER_HOST="drone.exemple.com"
DRONE_SERVER_PROTO="https"
DRONE_SERVER_PORT=:8080
# secret
DRONE_RPC_SECRET=""
# access configuration
DRONE_USER_CREATE=
DRONE_USER_FILTER=
DRONE_REGISTRATION_CLOSED=false
# debug
DRONE_LOGS_DEBUG=false