diff options
author | Manuel Rüger <mrueg@gentoo.org> | 2017-04-11 16:53:21 +0200 |
---|---|---|
committer | Manuel Rüger <mrueg@gentoo.org> | 2017-04-11 16:53:21 +0200 |
commit | 65f8e2da388d73dc4db151cc983bd7eea756c006 (patch) | |
tree | 3735fc24a36b67d5b0fb6fe046f3a4e709efc1a1 /dev-util/drone | |
parent | sys-cluster/cinder: 10.0.1 bup (diff) | |
download | gentoo-65f8e2da388d73dc4db151cc983bd7eea756c006.tar.gz gentoo-65f8e2da388d73dc4db151cc983bd7eea756c006.tar.bz2 gentoo-65f8e2da388d73dc4db151cc983bd7eea756c006.zip |
dev-util/drone: Add initscript, add user
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'dev-util/drone')
-rw-r--r-- | dev-util/drone/drone-0.5.0-r1.ebuild | 51 | ||||
-rw-r--r-- | dev-util/drone/files/drone-agent.confd | 19 | ||||
-rw-r--r-- | dev-util/drone/files/drone-agent.initd | 18 | ||||
-rw-r--r-- | dev-util/drone/files/drone.confd | 47 | ||||
-rw-r--r-- | dev-util/drone/files/drone.initd | 18 |
5 files changed, 153 insertions, 0 deletions
diff --git a/dev-util/drone/drone-0.5.0-r1.ebuild b/dev-util/drone/drone-0.5.0-r1.ebuild new file mode 100644 index 000000000000..fd0af9704896 --- /dev/null +++ b/dev-util/drone/drone-0.5.0-r1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +EGO_PN="github.com/drone/drone/..." +EGIT_COMMIT="dc5f01d00ec2970fe881c6633fbf69f6f0cb8950" +EGO_VENDOR=( "github.com/drone/mq 280af2a3b9c7d9ce90d625150dfff972c6c190b8" + "github.com/tidwall/redlog 550629ebbfa9925a73f69cce7cdd2e8dae52c713" + "golang.org/x/crypto 728b753d0135da6801d45a38e6f43ff55779c5c2 github.com/golang/crypto" ) + +inherit golang-build golang-vcs-snapshot user + +ARCHIVE_URI="https://${EGO_PN%/*}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +KEYWORDS="~amd64" + +DESCRIPTION="A Continuous Delivery platform built on Docker, written in Go" +HOMEPAGE="https://github.com/drone/drone" +SRC_URI="${ARCHIVE_URI} + ${EGO_VENDOR_URI}" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="" + +DEPEND="dev-go/go-bindata + dev-go/go-bindata-assetfs:= + dev-util/drone-ui:=" + +pkg_setup() { + enewgroup drone + enewuser drone -1 -1 -1 drone +} + +src_compile() { + GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" emake -C src/github.com/drone/drone gen || die + pushd src || die + DRONE_BUILD_NUMBER="${EGIT_COMMIT:0:7}" GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)"\ + go install -ldflags "-extldflags '-static' -X github.com/drone/drone/version.VersionDev=${EGIT_COMMIT:0:7}" github.com/drone/drone/drone || die + popd || die +} + +src_install() { + dobin bin/* + dodoc src/github.com/drone/drone/README.md + keepdir /var/log/drone /var/lib/drone + fowners -R drone:drone /var/log/drone /var/lib/drone + newinitd "${FILESDIR}"/drone.initd drone + newconfd "${FILESDIR}"/drone.confd drone + newinitd "${FILESDIR}"/drone-agent.initd drone-agent + newconfd "${FILESDIR}"/drone-agent.confd drone-agent +} diff --git a/dev-util/drone/files/drone-agent.confd b/dev-util/drone/files/drone-agent.confd new file mode 100644 index 000000000000..bfe82b16c756 --- /dev/null +++ b/dev-util/drone/files/drone-agent.confd @@ -0,0 +1,19 @@ +# arguments for drone-agent +# See also http://readme.drone.io/admin/installation-reference/ +#DRONE_SERVER= +#DRONE_SECRET= +#DRONE_DEBUG=false +#DRONE_BACKOFF=15s +#DRONE_TIMEOUT=15m +#DRONE_MAX_LOGS=5 +#DRONE_PLUGIN_PULL=true +#DRONE_PLUGIN_PRIVILEGED +#DOCKER_HOST +#DOCKER_TLS_VERIFY +#DOCKER_CERT_PATH +#DOCKER_MAX_PROCS=2 +#DOCKER_OS=linux +#DOCKER_ARCH=amd64 +#HTTP_PROXY= +#HTTPS_PROXY= +#NO_PROXY= diff --git a/dev-util/drone/files/drone-agent.initd b/dev-util/drone/files/drone-agent.initd new file mode 100644 index 000000000000..b231f518fd6b --- /dev/null +++ b/dev-util/drone/files/drone-agent.initd @@ -0,0 +1,18 @@ +#!/sbin/openrc-run +# Copyright 2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="Drone CI Agent" +pidfile=${pidfile:-"/run/drone/${SVCNAME}.pid"} +user=${user:-drone} +group=${group:-drone} + +command="/usr/bin/drone agent" +command_background="true" +start_stop_daemon_args="--user ${user} --group ${group} \ + --stdout /var/log/drone/${SVCNAME}.log \ + --stderr /var/log/drone/${SVCNAME}.log" + +start_pre() { + checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}" +} diff --git a/dev-util/drone/files/drone.confd b/dev-util/drone/files/drone.confd new file mode 100644 index 000000000000..5f4bb24dc28e --- /dev/null +++ b/dev-util/drone/files/drone.confd @@ -0,0 +1,47 @@ +# 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=false +#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.initd b/dev-util/drone/files/drone.initd new file mode 100644 index 000000000000..0840db86bf9a --- /dev/null +++ b/dev-util/drone/files/drone.initd @@ -0,0 +1,18 @@ +#!/sbin/openrc-run +# Copyright 2016-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="Drone CI" +pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"} +user=${user:-${SVCNAME}} +group=${group:-${SVCNAME}} + +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" + +start_pre() { + checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}" +} |