feature/cleanup #53

Merged
manuel merged 4 commits from feature/cleanup into master 2020-09-27 13:41:36 +02:00
8 changed files with 6 additions and 262 deletions
Showing only changes of commit 2252920cf8 - Show all commits

View file

@ -1,3 +1,8 @@
27 Sep 2020; Manuel Friedli <manuel@gentoo.org> -drone-1.2.3.ebuild,
-drone-1.5.1.ebuild, -files/drone-1.2.3.confd, -files/drone-1.2.3.initd,
-files/drone-1.5.1.confd, -files/drone-1.5.1.initd:
dev-util/drone: Purge old ebuilds.
25 Sep 2020; Manuel Friedli <manuel@gentoo.org> drone-1.9.1.ebuild, 25 Sep 2020; Manuel Friedli <manuel@gentoo.org> drone-1.9.1.ebuild,
files/drone.sh: files/drone.sh:
dev-util/drone: Handle all variables in config file generically. dev-util/drone: Handle all variables in config file generically.

View file

@ -1,12 +1,6 @@
AUX app.ini 1553 BLAKE2B a4e9d0aecb76d6e0150f74f98454a28923f7b2cac5a6e5a8ffb0411bbfcaab883c77f83e115946d328104023706c33a4d9c673a4752d0a007a57be5e64c81e07 SHA512 52cc76b5af4cfe7cf0167b40560e026d5611aace93b8fdb69bf5bcb33536dbc4fe544d7dea51604ec85473b04f1d0252f7fff62f9d6e186927dc4dec1a1d4e17 AUX app.ini 1553 BLAKE2B a4e9d0aecb76d6e0150f74f98454a28923f7b2cac5a6e5a8ffb0411bbfcaab883c77f83e115946d328104023706c33a4d9c673a4752d0a007a57be5e64c81e07 SHA512 52cc76b5af4cfe7cf0167b40560e026d5611aace93b8fdb69bf5bcb33536dbc4fe544d7dea51604ec85473b04f1d0252f7fff62f9d6e186927dc4dec1a1d4e17
AUX drone-1.2.3.confd 1272 BLAKE2B 9722097b271e1b688559d2fbcd0e91decc03deaf868e91c62fe26c88b4f72806fc0fd628f4b47750ff707904bd88c5223ae58f0360a1c563ffe7bb11e08446fc SHA512 3960d26f6fa41eb3c6e9ccc719ac6c6ff7508f72c82507b2b2d5a6e7b88ce894933ee24ea73f2bc3c1a4460d12db78877805369def378f7d1d499c498a7a4f50
AUX drone-1.2.3.initd 1893 BLAKE2B 341983efd9f7e40f702d78782f9d0bc29ca4e919057dde742a4d49291fea61af82b0e474232f83b361894925608919674c7620447743e7b1c4b4bca70db52997 SHA512 887984ae903f2b162cb43b8fb5b5019f742a1891208a3f3f54ef6681a32aa279bcf4b9c758dc7652abbfd245bc2af38c0c199ff90b4a88c6bc00d55942592df2
AUX drone-1.5.1.confd 1272 BLAKE2B 9722097b271e1b688559d2fbcd0e91decc03deaf868e91c62fe26c88b4f72806fc0fd628f4b47750ff707904bd88c5223ae58f0360a1c563ffe7bb11e08446fc SHA512 3960d26f6fa41eb3c6e9ccc719ac6c6ff7508f72c82507b2b2d5a6e7b88ce894933ee24ea73f2bc3c1a4460d12db78877805369def378f7d1d499c498a7a4f50
AUX drone-1.5.1.initd 1851 BLAKE2B b7b865575537f2c867140451301e7eccf9a49b28025d4e64c22a1d3c121db0438702a5541782355722523cd21dbcb02d464a1d85c0bb48c32b10343be8095977 SHA512 203ddc0bbc7538d1ece8c1db61808b41f86bef338aad49ffaa9d385a85f5c1c5c48cae3a9be0c5b48ddea1ff30e96ec0dca25de66b2359ec0d246eb7f274a8b1
AUX drone.service 662 BLAKE2B 32db6b3a5709534e3635dff717ffe4c8612febfd053cdd5fd372a8b6a3fd48afb023839610dcdaed637cf6aa4e5a36dcc0fec452aba3896a04bfdea2d06b4df7 SHA512 2bc4e5c0e503b01f7109de5e487a9b63a528ee2a9d82faf8cbb0f89c1d033f8c2dc85dca70a97039c1989caa980c7b60255f9003ab781d80d660ff5f39821c42 AUX drone.service 662 BLAKE2B 32db6b3a5709534e3635dff717ffe4c8612febfd053cdd5fd372a8b6a3fd48afb023839610dcdaed637cf6aa4e5a36dcc0fec452aba3896a04bfdea2d06b4df7 SHA512 2bc4e5c0e503b01f7109de5e487a9b63a528ee2a9d82faf8cbb0f89c1d033f8c2dc85dca70a97039c1989caa980c7b60255f9003ab781d80d660ff5f39821c42
AUX drone.sh 591 BLAKE2B 81b437ab72793c3cbc82d4a49300eee45d8faffb6ad06ad3bfb194e07c7cc466875a7dcd08138e7ec9073a53885a3c3d94c862bcfac6d2e82639ca9d657581d0 SHA512 0772bbc0f92301d808e19d2a19f2169cb34ce30fb5253fb40db6d2b69a3ac8a050a3366280fb66ea520afbd16a2882949ebeec53662ee323f2f1058a1339ffc1 AUX drone.sh 591 BLAKE2B 81b437ab72793c3cbc82d4a49300eee45d8faffb6ad06ad3bfb194e07c7cc466875a7dcd08138e7ec9073a53885a3c3d94c862bcfac6d2e82639ca9d657581d0 SHA512 0772bbc0f92301d808e19d2a19f2169cb34ce30fb5253fb40db6d2b69a3ac8a050a3366280fb66ea520afbd16a2882949ebeec53662ee323f2f1058a1339ffc1
EBUILD drone-1.2.3.ebuild 523 BLAKE2B 20ec727b9488eab0e2c9c7eabc6845ec9705ad3bdfb70803cefc52a4e85ca87f81d9089272c60e3ace8860eb5260e6348aae9f8b719c478e69dca8207d8323bc SHA512 b3ba803d16f6cc8acffcd19c96c993f502551ff0388bf0e5dc6b8c87f7a9389e3da5390de0ec326db617aea96344a46fcb7095bac17280185b61cce06bc6905f
EBUILD drone-1.5.1.ebuild 523 BLAKE2B 20ec727b9488eab0e2c9c7eabc6845ec9705ad3bdfb70803cefc52a4e85ca87f81d9089272c60e3ace8860eb5260e6348aae9f8b719c478e69dca8207d8323bc SHA512 b3ba803d16f6cc8acffcd19c96c993f502551ff0388bf0e5dc6b8c87f7a9389e3da5390de0ec326db617aea96344a46fcb7095bac17280185b61cce06bc6905f
EBUILD drone-1.9.1.ebuild 928 BLAKE2B 4f3e750dfd90c7ddbdb3b95170e17ba93b9944e264066b9bf5714a13494ee9e2707de04c1adf5568adc44f52e9c2435cc7587908274f2ab2a96a2cd280d019ac SHA512 fd4eeed82bb2414eedcec9607faa5f566278922161cb751c15a7b13a270cb3d872386b7978e95de962939a3e9a21ba091616d94782c6de4e58ec60c9bb872ad9 EBUILD drone-1.9.1.ebuild 928 BLAKE2B 4f3e750dfd90c7ddbdb3b95170e17ba93b9944e264066b9bf5714a13494ee9e2707de04c1adf5568adc44f52e9c2435cc7587908274f2ab2a96a2cd280d019ac SHA512 fd4eeed82bb2414eedcec9607faa5f566278922161cb751c15a7b13a270cb3d872386b7978e95de962939a3e9a21ba091616d94782c6de4e58ec60c9bb872ad9
MISC ChangeLog 1181 BLAKE2B 859c5070401bb193f10a9ab9cbcba93994a61ed0897c0d1416b15605ff4f8a879630a0909f90fb16dcab472ffe9c3ef206f275aad31bcdfd5335090ddd5a3c2e SHA512 b36d542bae9266e7f749e41faf6e6c7ccc5a960bb0c67a8153645ae34f87a80fefce5141e7efc9d5e9e3ddb879543037af96359f0784b7f15ab9b28424e8ddc1 MISC ChangeLog 1419 BLAKE2B 6ca3726c46020d390e28333fe68156c919b2d1eaf48224cac563dd43710e3f6175821f105125bb70cc43db383ec3ea9f056a67d8628ee413069dca63c8e953f1 SHA512 d7d6c29fa995801cbdb687523927e329a1c1254fbd701b1250eade97e5204d895d3c33978854b1eaa3cc5a9115902a1d2f35c545e1f45d30a1b0ca65773d6f98
MISC metadata.xml 248 BLAKE2B cb50cad2c614a99daa2e236f9e0d0fab1ab20a898c0b0f0c28a1387820ab1f2b9dd4d396a3b38f732b493824f96a29ee5894e80e09dbd08dff62c1aaba3feaa0 SHA512 29f9b96b0a77546cce6a8bffd82fae2fd0939d32a7a05ffd0d91f9250a019a3ddaa599b93988c82daabb9c4c4b284dd947e2c47f6ca7727b8539cffa91bcb8c2 MISC metadata.xml 248 BLAKE2B cb50cad2c614a99daa2e236f9e0d0fab1ab20a898c0b0f0c28a1387820ab1f2b9dd4d396a3b38f732b493824f96a29ee5894e80e09dbd08dff62c1aaba3feaa0 SHA512 29f9b96b0a77546cce6a8bffd82fae2fd0939d32a7a05ffd0d91f9250a019a3ddaa599b93988c82daabb9c4c4b284dd947e2c47f6ca7727b8539cffa91bcb8c2

View file

@ -1,26 +0,0 @@
# 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}"
}

View file

@ -1,26 +0,0 @@
# 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}"
}

View file

@ -1,39 +0,0 @@
# 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

@ -1,63 +0,0 @@
#!/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}
}

View file

@ -1,39 +0,0 @@
# 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

@ -1,62 +0,0 @@
#!/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_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:1.5.1
}
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:1.5.1 \
> ${container_name_file}
}
stop() {
docker container stop $(cat ${container_name_file})
}
stop_post() {
docker container rm $(cat ${container_name_file})
rm ${container_name_file}
}