dev-util/drone: Add ebuild for version 1.2.3
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details

Also, make all files in files/ non-executable.

Package-Manager: Portage-2.3.66, Repoman-2.3.11
This commit is contained in:
Manuel Friedli 2019-08-05 01:24:50 +02:00
parent 638cb51bc3
commit f136fa5436
7 changed files with 140 additions and 1 deletions

View File

@ -1,3 +1,11 @@
*drone-1.2.3 (04 Aug 2019)
04 Aug 2019; Manuel Friedli <manuel@fritteli.ch> +drone-1.2.3.ebuild,
+files/drone-1.2.3.confd, +files/drone-1.2.3.initd, files/drone-1.1.0.confd,
files/drone-1.1.0.initd:
dev-util/drone: Add ebuild for version 1.2.3 Also, make all files in files/
non-executable.
*drone-1.1.0 (03 May 2019)
03 May 2019; <manuel@gentoo.org> +drone-1.1.0.ebuild,

View File

@ -1,5 +1,8 @@
AUX drone-1.1.0.confd 1272 BLAKE2B 9722097b271e1b688559d2fbcd0e91decc03deaf868e91c62fe26c88b4f72806fc0fd628f4b47750ff707904bd88c5223ae58f0360a1c563ffe7bb11e08446fc SHA512 3960d26f6fa41eb3c6e9ccc719ac6c6ff7508f72c82507b2b2d5a6e7b88ce894933ee24ea73f2bc3c1a4460d12db78877805369def378f7d1d499c498a7a4f50
AUX drone-1.1.0.initd 1851 BLAKE2B 89a15a0061c106e47d6c89267e697029ca2eef4d2d9920860e6b197f0cb8d58e5cbe37fd5223d5117ce3a3d3d827e0f36f9c34f97df6c3f697701cbd68a18337 SHA512 c8ab93b38715fe358bf92cfde29ec963bfd4849cf7e3e9d12d0476ac50de274957fd48de3cfc0ecf572a4c3581429a40c474a5342708777bc4ef4d41e9b2787a
AUX drone-1.2.3.confd 1272 BLAKE2B 9722097b271e1b688559d2fbcd0e91decc03deaf868e91c62fe26c88b4f72806fc0fd628f4b47750ff707904bd88c5223ae58f0360a1c563ffe7bb11e08446fc SHA512 3960d26f6fa41eb3c6e9ccc719ac6c6ff7508f72c82507b2b2d5a6e7b88ce894933ee24ea73f2bc3c1a4460d12db78877805369def378f7d1d499c498a7a4f50
AUX drone-1.2.3.initd 1893 BLAKE2B 341983efd9f7e40f702d78782f9d0bc29ca4e919057dde742a4d49291fea61af82b0e474232f83b361894925608919674c7620447743e7b1c4b4bca70db52997 SHA512 887984ae903f2b162cb43b8fb5b5019f742a1891208a3f3f54ef6681a32aa279bcf4b9c758dc7652abbfd245bc2af38c0c199ff90b4a88c6bc00d55942592df2
EBUILD drone-1.1.0.ebuild 523 BLAKE2B 20ec727b9488eab0e2c9c7eabc6845ec9705ad3bdfb70803cefc52a4e85ca87f81d9089272c60e3ace8860eb5260e6348aae9f8b719c478e69dca8207d8323bc SHA512 b3ba803d16f6cc8acffcd19c96c993f502551ff0388bf0e5dc6b8c87f7a9389e3da5390de0ec326db617aea96344a46fcb7095bac17280185b61cce06bc6905f
MISC ChangeLog 201 BLAKE2B 3669f8a0a0e902e117fac513aebbb0b6c2ede455e95037a69c696f135581bfa1c6e43f55ebde27e96312a1122d68b40943f0fbf2ae426c0c28770f417cae7a4e SHA512 6939024478937ac39c91f98125b2735d1521e5c15a14783f44fe40e26bf9840f9d4dbdbc2b65b559f9446650b86daf599f2b640b87dbee84e78ec2b2c1a32e37
EBUILD drone-1.2.3.ebuild 523 BLAKE2B 20ec727b9488eab0e2c9c7eabc6845ec9705ad3bdfb70803cefc52a4e85ca87f81d9089272c60e3ace8860eb5260e6348aae9f8b719c478e69dca8207d8323bc SHA512 b3ba803d16f6cc8acffcd19c96c993f502551ff0388bf0e5dc6b8c87f7a9389e3da5390de0ec326db617aea96344a46fcb7095bac17280185b61cce06bc6905f
MISC ChangeLog 505 BLAKE2B 0b850630e2d5ab0118f49341e6919cb0f28acf8ae644e492ebe8b085f4cf9435b138bc56587f1b549d2f13d11a3347e2fd4834593b74ea21be5b053f5c2c7e8e SHA512 e2b865dd734753705fe352184806ff13c0d7c807859a66f64e8e378d3fe044c73377729f71a01156b80deff984630ff0caf7fb16c5b1e45f6dfddb93acdaa5b3
MISC metadata.xml 248 BLAKE2B cb50cad2c614a99daa2e236f9e0d0fab1ab20a898c0b0f0c28a1387820ab1f2b9dd4d396a3b38f732b493824f96a29ee5894e80e09dbd08dff62c1aaba3feaa0 SHA512 29f9b96b0a77546cce6a8bffd82fae2fd0939d32a7a05ffd0d91f9250a019a3ddaa599b93988c82daabb9c4c4b284dd947e2c47f6ca7727b8539cffa91bcb8c2

View File

@ -0,0 +1,26 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
DESCRIPTION="Drone CI - Automate Software Testing and Delivery"
HOMEPAGE="https://drone.io/"
#SRC_URI=""
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE="sqlite mysql"
RESTRICT="mirror"
DEPEND=""
RDEPEND="app-emulation/docker
sqlite? ( dev-db/sqlite:3 )
mysql? ( dev-db/mysql )"
S="${WORKDIR}"
src_install() {
newconfd "${FILESDIR}"/"${P}.confd" "${PN}"
newinitd "${FILESDIR}"/"${P}.initd" "${PN}"
}

0
dev-util/drone/files/drone-1.1.0.confd Executable file → Normal file
View File

0
dev-util/drone/files/drone-1.1.0.initd Executable file → Normal file
View File

View File

@ -0,0 +1,39 @@
# set this to the full hostname (including scheme) of your Gitea instance
DRONE_GITEA_SERVER=http://gitea.example.com/
# set this to the bare hostname of your Drone instance
DRONE_SERVER_HOST=drone.example.com
# set this to http or https, depending whether you intend to serve Drone over SSL or not
DRONE_SERVER_PROTO=https
# These values are obtained when registering Drone as an OAuth2 application in your Gitea instance
DRONE_GITEA_CLIENT_ID=
DRONE_GITEA_CLIENT_SECRET=
# The path to the docker socket
DOCKER_SOCKET=/var/run/docker.sock
# The path to the MySQL socket
# FIXME this must be done better, in a more generic way
MYSQL_SOCKET=/var/run/mysqld/mysqld.sock
# The full datasource path to your Drone database
DRONE_DATABASE_DATASOURCE=/data/drone.sqlite
# The database driver Drone should use (sqlite, mysql, ...)
DRONE_DATABASE_DRIVER=sqlite
# Number of agents that should be started concurrently on your Drone instance
DRONE_RUNNER_CAPACITY=2
# If logging in doesn't work, try setting this to true
DRONE_GIT_ALWAYS_AUTH=false
# Leave this false if you don't intend to use ACME/Letsencrypt
# FIXME really??
DRONE_TLS_AUTOCERT=false
# What port to public from your container. Format:
# <hostport>:<containerport>, e.g. 8080:80
DRONE_PUBLISH_PORT=80:80

View File

@ -0,0 +1,63 @@
#!/sbin/openrc-run
# Copyright 2016-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
description="Drone CI - Automate software testing and delivery"
container_name_file=/var/run/drone-container.name
drone_version=1.2.3
: ${DRONE_GITEA_SERVER:=http://localhost/
: ${DRONE_SERVER_HOST:=localhost}
: ${DRONE_SERVER_PROTO:=https}
: ${DRONE_GITEA_CLIENT_ID:=}
: ${DRONE_GITEA_CLIENT_SECRET:=}
: ${DOCKER_SOCKET:=/var/run/docker.sock}
# fixme this must be done better, in a more generic way
: ${MYSQL_SOCKET:=/var/run/mysqld/mysqld.sock}
: ${DRONE_DATABASE_DATASOURCE:=/data/drone.sqlite}
: ${DRONE_DATABASE_DRIVER:=sqlite}
: ${DRONE_RUNNER_CAPACITY:=2}
: ${DRONE_GIT_ALWAYS_AUTH:=false}
: ${DRONE_TLS_AUTOCERT:=false}
: ${DRONE_PUBLISH_PORT:=80:80}
depend() {
need docker
after mysql
}
pre_start() {
docker pull drone/drone:${drone_version}
}
start() {
docker run \
--volume=${DOCKER_SOCKET}:${DOCKER_SOCKET} \
--volume=${MYSQL_SOCKET}:${MYSQL_SOCKET} \
--env=DRONE_GITEA_SERVER=${DRONE_GITEA_SERVER} \
--env=DRONE_GITEA_CLIENT_ID=${DRONE_GITEA_CLIENT_ID} \
--env=DRONE_GITEA_CLIENT_SECRET=${DRONE_GITEA_CLIENT_SECRET} \
--env=DRONE_GIT_ALWAYS_AUTH=${DRONE_GIT_ALWAYS_AUTH} \
--env=DRONE_RUNNER_CAPACITY=${DRONE_RUNNER_CAPACITY} \
--env=DRONE_SERVER_HOST=${DRONE_SERVER_HOST} \
--env=DRONE_SERVER_PROTO=${DRONE_SERVER_PROTO} \
--env=DRONE_TLS_AUTOCERT=${DRONE_TLS_AUTOCERT} \
--env=DRONE_DATABASE_DATASOURCE="${DRONE_DATABASE_DATASOURCE}" \
--env=DRONE_DATABASE_DRIVER=${DRONE_DATABASE_DRIVER} \
--publish=${DRONE_PUBLISH_PORT} \
--restart=always \
--detach=true \
--name=drone \
drone/drone:${drone_version} \
> ${container_name_file}
}
stop() {
docker container stop $(cat ${container_name_file})
}
stop_post() {
docker container rm $(cat ${container_name_file})
rm ${container_name_file}
}