1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
13 DESCRIPTION="Scripts for automatically creating Jenkins jobs from scm branches"
14 HOMEPAGE="https://github.com/gvalkov/jenkins-autojobs"
15 SRC_URI="https://github.com/gvalkov/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
16 http://updates.jenkins-ci.org/download/plugins/mercurial/${MERCURIAL_PV}/mercurial.hpi -> ${P}_mercurial_${MERCURIAL_PV}.hpi
17 http://updates.jenkins-ci.org/download/plugins/git/${GIT_PV}/git.hpi -> ${P}_git_${GIT_PV}.hpi"
24 RDEPEND=">dev-python/jenkins-webapi-0.3.2[${PYTHON_USEDEP}]
25 >=dev-python/lxml-3.2.3[${PYTHON_USEDEP}]
26 >=dev-python/pyyaml-3.11[${PYTHON_USEDEP}]
27 >=dev-python/requests-2.5.0[${PYTHON_USEDEP}]"
29 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
33 dev-python/pytest[${PYTHON_USEDEP}] )
34 doc? ( >=dev-python/sphinx-1.2.3[${PYTHON_USEDEP}]
35 >=dev-python/alabaster-0.6.1[${PYTHON_USEDEP}] )"
37 PATCHES=( "${FILESDIR}/local_jenkins.patch" )
42 mkdir -p ${P}/tests/tmp/WEB-INF/plugins/
44 cp -v "${DISTDIR}"/${P}_mercurial_${MERCURIAL_PV}.hpi ${P}/tests/tmp/WEB-INF/plugins/mercurial.hpi
45 cp -v "${DISTDIR}"/${P}_git_${GIT_PV}.hpi ${P}/tests/tmp/WEB-INF/plugins/git.hpi
50 # Test phase works with the limitation that it need be run as root in portage
52 ./tests/bin/start-jenkins.sh
54 py.test || die "Failed with ${EPYTHON}"
57 echo 0 | nc 127.0.0.1 60887
60 python_compile_all() {
61 use doc && emake -C doc html
64 python_install_all() {
65 use doc && local HTML_DOCS=( doc/_build/html/. )
66 distutils-r1_python_install_all