diff options
author | William Hubbs <williamh@gentoo.org> | 2023-08-09 12:41:58 -0500 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2023-08-09 12:45:37 -0500 |
commit | f5b240ddba057505444ea9c5de375a5f5c232335 (patch) | |
tree | aa3e27152a6c9480f5ccc45b9c265d0e5857c563 /dev-util/drone | |
parent | app-editors/vscodium: drop 1.80.1.23194 (diff) | |
download | gentoo-f5b240ddba057505444ea9c5de375a5f5c232335.tar.gz gentoo-f5b240ddba057505444ea9c5de375a5f5c232335.tar.bz2 gentoo-f5b240ddba057505444ea9c5de375a5f5c232335.zip |
dev-util/drone: add 2.18.0
Closes: https://bugs.gentoo.org/665748
Closes: https://bugs.gentoo.org/842030
Closes: https://github.com/gentoo/gentoo/pull/29817
Signed-off-by: William Hubbs <williamh@gentoo.org>
Diffstat (limited to 'dev-util/drone')
-rw-r--r-- | dev-util/drone/Manifest | 2 | ||||
-rw-r--r-- | dev-util/drone/drone-2.18.0.ebuild | 36 | ||||
-rw-r--r-- | dev-util/drone/files/drone-server.conf | 81 | ||||
-rw-r--r-- | dev-util/drone/files/drone-server.confd | 47 | ||||
-rw-r--r-- | dev-util/drone/files/drone-server.initd | 19 | ||||
-rw-r--r-- | dev-util/drone/files/drone-server.service | 25 |
6 files changed, 159 insertions, 51 deletions
diff --git a/dev-util/drone/Manifest b/dev-util/drone/Manifest index a5d1bdfd8586..7ce0c7160678 100644 --- a/dev-util/drone/Manifest +++ b/dev-util/drone/Manifest @@ -2,3 +2,5 @@ DIST drone-2.11.1-deps.tar.xz 135830428 BLAKE2B 8b1c42d6ebf445477018bb58776eea8b DIST drone-2.11.1.tar.gz 311271 BLAKE2B 319a04ca2fac7d43bfc86a94a6008d07aa2565967b849f824f4a9be688d629e2b41ad98cd8319549687c842545af12260daa435e29dc1d394fa22708bdb5970a SHA512 f782427321ed990f503041ed4a4a692133f89797a16453f4238648cbd8b924bc3fb473e991668f3cba8bde0dcf87c79a5a11c02c4dfe738dd82e94009f95a685 DIST drone-2.13.0-deps.tar.xz 134308908 BLAKE2B 455efee3eae4502ae6b434c42115f5bc18eb2cbf77094234f060129f4c22470f24c9206a01a473d583d9fb8c925825f9c909a92a3665924981e549e91a2ecb59 SHA512 b1db03d44c4e9df8fcd6e8c302b73bbe0cfbdefa4b67ee07fad15a44d5406b372833830aae795f435da4425cfee304c324c92fd6023341d77ea4c0758f4104dc DIST drone-2.13.0.tar.gz 314427 BLAKE2B aafd2c970dfa7b9d67fc18f5a858cb4a76ca5503e8d61cf3fae7857bef91c2a965fffb535cb7c5c310f10b5f64fd9f568bda10ae704d61449a255b9adf7e8ef3 SHA512 58a30e7136ed366a5dc51a979efb677d95b2ab180982a95ea3984f35c3eba05c81b4ce3cf6bb594fd33c992704216313222c750b7857026fb316e5fce13aed01 +DIST drone-2.18.0-deps.tar.xz 141105460 BLAKE2B 2256bdf1dbe4782aa034c529d16d0fe97bc69880b06238a185954a8d49cd5338cb24fee266265e67e7ea25933a3205eb590de65c83c52cbd3fc667f5fb7760bc SHA512 866748cc49660efad1ca925c25055986065735d3f1f46f5a6958634bd63797c73b02eddc8a1eccbcd8c55d49630d692cb258ee94b2cf8cb30c9adecaf6490a95 +DIST drone-2.18.0.tar.gz 316382 BLAKE2B a60e9302a61edb1536f696e588011a38976d1ba31f7eed5c2f1d49c30769acae2dec8072f7f930b5e492dd3329b08a35bad087907d0818a5c487b5b6c24cb798 SHA512 c738d338056dc5758f4d589749513b832de1b68b1e81fbd8214bd69acf7f1d53b89b960cabc246edc369c02bd8900a01925279992b845f37a4a11573960a5696 diff --git a/dev-util/drone/drone-2.18.0.ebuild b/dev-util/drone/drone-2.18.0.ebuild new file mode 100644 index 000000000000..6f45d08d86b7 --- /dev/null +++ b/dev-util/drone/drone-2.18.0.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit go-module systemd + +DESCRIPTION="A Continuous Delivery platform built on Docker, written in Go" +HOMEPAGE="https://github.com/drone/drone" +SRC_URI="https://github.com/drone/drone/archive/v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND="acct-group/drone + acct-user/drone" + RDEPEND="${DEPEND}" + +RESTRICT="test" + +src_compile() { + ego build -ldflags "-extldflags \"-static\"" \ + ./cmd/drone-server +} + +src_install() { + dobin drone-server + dodoc CHANGELOG.md HISTORY.md + insinto /etc + doins "${FILESDIR}"/drone-server.conf + newinitd "${FILESDIR}"/drone-server.initd drone-server + systemd_dounit "${FILESDIR}"/drone-server.service + keepdir /var/log/drone /var/lib/drone + fowners -R ${PN}:${PN} /var/log/drone /var/lib/drone +} diff --git a/dev-util/drone/files/drone-server.conf b/dev-util/drone/files/drone-server.conf new file mode 100644 index 000000000000..ab17fe08e3fe --- /dev/null +++ b/dev-util/drone/files/drone-server.conf @@ -0,0 +1,81 @@ +# environment variables for drone +# See also http://docs.drone.io/server/reference/ +# DRONE_BITBUCKET_CLIENT_ID= +# DRONE_BITBUCKET_SECRET= +# DRONE_BITBUCKET_DEBUG= +# DRONE_CLEANUP_DEADLINE_PENDING= +# DRONE_CLEANUP_DEADLINE_RUNNING= +# DRONE_CLEANUP_DISABLED= +# DRONE_CLEANUP_INTERVAL= +# DRONE_CONVERT_PLUGIN_ENDPOINT= +# DRONE_CONVERT_PLUGIN_EXTENSION= +# DRONE_CONVERT_PLUGIN_SECRET= +# DRONE_CONVERT_PLUGIN_SKIP_VERIFY= +# DRONE_COOKIE_SECRET= +# DRONE_COOKIE_TIMEOUT= +# DRONE_CRON_DISABLED= +# DRONE_CRON_INTERVAL= +DRONE_DATABASE_DATASOURCE="/var/lib/drone/drone.sqlite" +# DRONE_DATABASE_DRIVER=sqlite3 +# DRONE_DATABASE_MAX_CONNECTIONS= +# DRONE_DATABASE_SECRET= +# DRONE_GIT_ALWAYS_AUTH= +# DRONE_GIT_PASSWORD= +# DRONE_GIT_USERNAME= +# DRONE_GITEA_CLIENT_ID= +# DRONE_GITEA_CLIENT_SECRET= +# DRONE_GITEA_SERVER= +# DRONE_GITEA_SKIP_VERIFY= +# DRONE_GITEE_REDIRECT_URL= +# DRONE_GITEE_SCOPE= +# DRONE_GITEE_SKIP_VERIFY= +# DRONE_GITHUB_CLIENT_ID= +# DRONE_GITHUB_CLIENT_SECRET= +# DRONE_GITHUB_SCOPE= +# DRONE_GITHUB_SERVER= +# DRONE_GITHUB_SKIP_VERIFY=false +# DRONE_GITLAB_CLIENT_ID= +# DRONE_GITLAB_CLIENT_SECRET= +# DRONE_GITLAB_SERVER= +# DRONE_GITLAB_SKIP_VERIFY=false +# DRONE_GOGS_SERVER= +# DRONE_GOGS_SKIP_VERIFY=false +# DRONE_JSONNET_ENABLED= +# DRONE_LICENSE= +# DRONE_LOGS_COLOR= +# DRONE_LOGS_DEBUG= +# DRONE_LOGS_PRETTY= +# DRONE_LOGS_TEXT= +# DRONE_LOGS_TRACE= +# DRONE_PROMETHEUS_ANONYMOUS_ACCESS= +# DRONE_REGISTRATION_CLOSED= +# DRONE_REPOSITORY_FILTER= +# DRONE_RPC_SECRET= +# DRONE_S3_BUCKET= +# DRONE_S3_ENDPOINT= +# DRONE_S3_PATH_STYLE= +# DRONE_S3_PREFIX= +# DRONE_SERVER_HOST= +# DRONE_SERVER_PROTO= +# DRONE_SERVER_PROXY_HOST= +# DRONE_SERVER_PROXY_PROTO= +# DRONE_STARTUP_ENABLED= +# DRONE_STARTUP_STEP_LIMIT= +# DRONE_STASH_CONSUMER_KEY= +# DRONE_STASH_PRIVATE_KEY= +# DRONE_STASH_SERVER= +# DRONE_STASH_SKIP_VERIFY= +# DRONE_STATUS_DISABLED= +# DRONE_STATUS_NAME= +# DRONE_TLS_AUTOCERT= +# DRONE_TLS_CERT= +# DRONE_TLS_KEY= +# DRONE_USER_CREATE= +# DRONE_USER_FILTER= +# DRONE_VALIDATE_PLUGIN_ENDPOINT= +# DRONE_VALIDATE_PLUGIN_SECRET= +# DRONE_VALIDATE_PLUGIN_SKIP_VERIFY= +# DRONE_WEBHOOK_ENDPOINT= +# DRONE_WEBHOOK_EVENTS= +# DRONE_WEBHOOK_SECRET= +# DRONE_WEBHOOK_SKIP_VERIFY= diff --git a/dev-util/drone/files/drone-server.confd b/dev-util/drone/files/drone-server.confd deleted file mode 100644 index 3d4fd461402d..000000000000 --- a/dev-util/drone/files/drone-server.confd +++ /dev/null @@ -1,47 +0,0 @@ -# arguments for drone -# See also http://readme.drone.io/admin/installation-reference/ -#DRONE_SECRET= -#DRONE_DEBUG=false -#DRONE_SERVER_CERT= -#DRONE_SERVER_KEY= -#DRONE_ADMIN= -#DRONE_ORGS= -#DRONE_OPEN=false -#DRONE_YAML=.drone.yml -#DRONE_CACHE_TTY=15m -DRONE_DATABASE_DRIVER=sqlite3 -DRONE_DATABASE_DATASOURCE="/var/lib/drone/drone.sqlite" -DRONE_GITHUB=true -#DRONE_GITHUB_URL=https://github.com -#DRONE_GITHUB_CLIENT= -#DRONE_GITHUB_SECRET= -#DRONE_GITHUB_SCOPE= -#DRONE_GITHUB_GIT_USERNAME= -#DRONE_GITHUB_GIT_PASSWORD= -#DRONE_GITHUB_PRIVATE_MODE=false -#DRONE_GITHUB_MERGE_REF=true -#DRONE_GITHUB_CONTEXT=continuous-integration/drone -#DRONE_GITHUB_SKIP_VERIFY=false -#DRONE_GOGS=false -#DRONE_GOGS_URL= -#DRONE_GOGS_GIT_USERNAME= -#DRONE_GOGS_GIT_PASSWORD= -#DRONE_GOGS_PRIVATE_MODE= -#DRONE_GOGS_SKIP_VERIFY=false -#DRONE_BITBUCKET=false -#DRONE_BITBUCKET_CLIENT= -#DRONE_BITBUCKET_SECRET= -#DRONE_STASH=false -#DRONE_STASH_URL= -#DRONE_STASH_CONSUMER_KEY= -#DRONE_STASH_CONSUMER_RSA= -#DRONE_STASH_GIT_USERNAME= -#DRONE_STASH_GIT_PASSWORD= -#DRONE_GITLAB=false -#DRONE_GITLAB_URL=https://gitlab.com -#DRONE_GITLAB_CLIENT= -#DRONE_GITLAB_SECRET= -#DRONE_GITLAB_GIT_USERNAME= -#DRONE_GITLAB_GIT_PASSWORD= -#DRONE_GITLAB_SKIP_VERIFY=false -#DRONE_GITLAB_PRIVATE_MODE=false diff --git a/dev-util/drone/files/drone-server.initd b/dev-util/drone/files/drone-server.initd index fe87c713db9e..4294ef9b74dc 100644 --- a/dev-util/drone/files/drone-server.initd +++ b/dev-util/drone/files/drone-server.initd @@ -3,12 +3,23 @@ # Distributed under the terms of the GNU General Public License v2 description="Drone CI" -pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"} +pidfile=${pidfile:-"/run/${RC_SVCNAME}/${RC_SVCNAME}.pid"} user=${user:-drone} group=${group:-drone} command="/usr/bin/drone-server" command_background="true" -start_stop_daemon_args="--user ${user} --group ${group} \ - --stdout /var/log/${SVCNAME}/${SVCNAME}.log \ - --stderr /var/log/${SVCNAME}/${SVCNAME}.log" +command_args="-env-file /etc/${RC_SVCNAME}.conf" +start_stop_daemon_args=" + --user ${user} + --group ${group} + --stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log + --stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log + " + +start_pre() { + [ -e /etc/${RC_SVCNAME}.conf ] && return + eerror "You need to create /etc/${RC_SVCNAME}.conf" + eerror "See http://docs.drone.io/server/reference/ for information." + return 1 +} diff --git a/dev-util/drone/files/drone-server.service b/dev-util/drone/files/drone-server.service new file mode 100644 index 000000000000..53f019a6a8bf --- /dev/null +++ b/dev-util/drone/files/drone-server.service @@ -0,0 +1,25 @@ +[Unit] +Description=Drone CI +Documentation=https://docs.drone.io/ + +After=mysqld.target +After=network.target +After=postgresql-9.6.service +After=postgresql-10.service +After=postgresql-11.service +After=postgresql-12.service +After=postgresql-13.service +After=postgresql-14.service +Requires=network.target + +[Service] +User=drone +Group=drone + +EnvironmentFile=/etc/drone-server.conf +ExecStart=/usr/bin/drone-server + +Restart=on-failure + +[Install] +WantedBy=multi-user.target |