dev-util/drone: Handle all variables in config file generically.

Package-Manager: Portage-3.0.4, Repoman-3.0.1
This commit is contained in:
Manuel Friedli 2020-09-25 23:46:10 +02:00
parent 86739ddf2f
commit ba2959aead
4 changed files with 17 additions and 12 deletions

View file

@ -1,3 +1,7 @@
25 Sep 2020; Manuel Friedli <manuel@gentoo.org> drone-1.9.1.ebuild,
files/drone.sh:
dev-util/drone: Handle all variables in config file generically.
*drone-1.9.1 (25 Sep 2020)
25 Sep 2020; Manuel Friedli <manuel@gentoo.org> +drone-1.9.1.ebuild,

View file

@ -4,9 +4,9 @@ AUX drone-1.2.3.initd 1893 BLAKE2B 341983efd9f7e40f702d78782f9d0bc29ca4e919057dd
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 651 BLAKE2B 8c2a44a0a19190e53bc5c3b3a15d827af42b7e4f19931e9553552c6e4be91fe35c61836e51627b2c03effbcd0f2eecc585c341ea7f12be309f6b98a041ac4764 SHA512 15a3a5b0f02cf6da5b83c2417d8718e3bc388a22c46924d08c6df70d945344384b4dcaf87fc0655e6f6ebbf9a3b20790722579e29a9ef7ff515c5857ef5b3cdb
AUX drone.sh 737 BLAKE2B a643236b49b0ce9cc3c575d401ac9a52b194571d5b41e89408fb404f0c3ffbafdcd1a252a912993ab133c8d83adb1d6f4ba6e1ac196ac54689d239ec355c417f SHA512 05203f328c9f5fa262caf28f6629409075783a333cabb0ffacc9ee23d00ac8fe47d117dbd3bd02626491265fa131bd34b9d0641fd509031941cd13edc1235679
AUX drone.sh 511 BLAKE2B dee9cb484102f92ad1eec6c63e8a008aa7fb11dbf3594bf8d281fae052f822606c2980c82ad5ff033124f7c6d92c92a16ff895ca371326bc85f33325a9f27916 SHA512 6874cbb4ab3972f8f791d419ad57832187d739da6e11eda81a06273d8235502a03761a7b3ba1aed09689c95e5f1a53826a0dd154c85e3a96dc21cb59b4745740
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 782 BLAKE2B 325868991758b8156e0a16065533e5c8801a86d5d34ab5c87509a99e680d1a3c9cd9b43ec848e1ffdc110fcf5cfc200f03069df9b99d90fd8ca974e912695780 SHA512 1055794d14135666050bc887e137c942c7481df3fb3424e34504daf097bf571a261e9f7592d05a06346ab651a5d62c4ad90b9d0777c4ab16f4c127d30208bb62
MISC ChangeLog 1025 BLAKE2B a0e98c24a5800a70d1bc8b8bda2b9d6f955045737d21e4010a3b7ef648a485007b59b5e30ff74bacc670b1f4395dcfcd785fd41be6a72e67304f64ab0f4eab04 SHA512 f6d2b772920da26b74ff4ed7304fd42263ae46c9096202bfa135ba8e2d3e7cc50a5c3a765bf30238ec84fb41dfc393036cc3aad6776a76617d9a49352a074678
EBUILD drone-1.9.1.ebuild 839 BLAKE2B e6819be8b37ee37213f718dae0cbf479ced61927048f44a2f24f2c8c82646cbeab4e9ae69bffe9ff07810adc75ef26ae521e084ce8754d38d693d8fbd9fe5a84 SHA512 ae132e180e0d3f86468e6de16dfaeb6a2a24f8ed98fce56ec7d01d11b720d500a30fed79bd1282d90058c1b1a3346c61a0a97e8214101156b44b099e292f2e17
MISC ChangeLog 1181 BLAKE2B 859c5070401bb193f10a9ab9cbcba93994a61ed0897c0d1416b15605ff4f8a879630a0909f90fb16dcab472ffe9c3ef206f275aad31bcdfd5335090ddd5a3c2e SHA512 b36d542bae9266e7f749e41faf6e6c7ccc5a960bb0c67a8153645ae34f87a80fefce5141e7efc9d5e9e3ddb879543037af96359f0784b7f15ab9b28424e8ddc1
MISC metadata.xml 248 BLAKE2B cb50cad2c614a99daa2e236f9e0d0fab1ab20a898c0b0f0c28a1387820ab1f2b9dd4d396a3b38f732b493824f96a29ee5894e80e09dbd08dff62c1aaba3feaa0 SHA512 29f9b96b0a77546cce6a8bffd82fae2fd0939d32a7a05ffd0d91f9250a019a3ddaa599b93988c82daabb9c4c4b284dd947e2c47f6ca7727b8539cffa91bcb8c2

View file

@ -38,6 +38,9 @@ src_install() {
insinto "/etc/drone"
doins "${FILESDIR}/app.ini"
fowners drone:drone /etc/drone
fperms 0700 /etc/drone
fowners drone:drone /etc/drone/app.ini
fperms 0600 /etc/drone/app.ini
}

View file

@ -8,21 +8,19 @@ fi
. "${DRONE_CONFIG_FILE}"
publishes=""
docker_args=""
for var in "${!DRONE_@}" ; do
docker_args="${docker_args} --env=${var}=${!var} "
done
for p in ${DOCKER_PUBLISH} ; do
publishes="${publishes} --publish=${p}"
docker_args="${docker_args} --publish=${p}"
done
docker run \
--volume=/var/lib/drone:/data \
--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_RPC_SECRET=${DRONE_RPC_SECRET} \
--env=DRONE_SERVER_HOST=${DRONE_SERVER_HOST} \
--env=DRONE_SERVER_PROTO=${DRONE_SERVER_PROTO} \
${publishes} \
${docker_args}
--restart=always \
--detach=true \
--name=drone \