parent
75120c3d21
commit
2057998b3a
|
@ -0,0 +1,35 @@
|
|||
@Library('eo-jenkins-lib@master') import eo.Utils
|
||||
|
||||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage('Unit Tests') {
|
||||
steps {
|
||||
sh 'tox -rv'
|
||||
}
|
||||
}
|
||||
stage('Packaging') {
|
||||
steps {
|
||||
script {
|
||||
if (env.JOB_NAME == 'combo' && env.GIT_BRANCH == 'origin/master') {
|
||||
sh 'sudo -H -u eobuilder /usr/local/bin/eobuilder -d jessie,stretch bijoe'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
utils = new Utils()
|
||||
utils.mail_notify(currentBuild, env, 'admin+jenkins-bijoe@entrouvert.com')
|
||||
utils.publish_coverage('coverage.xml')
|
||||
utils.publish_coverage_native('index.html')
|
||||
}
|
||||
junit '*_results.xml'
|
||||
}
|
||||
success {
|
||||
cleanWs()
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
rm -f coverage.xml
|
||||
rm -f test_results.xml
|
||||
|
||||
pip install --upgrade tox
|
||||
tox -r -e coverage-{dj18,dj19,dj110}
|
8
tox.ini
8
tox.ini
|
@ -4,11 +4,12 @@
|
|||
# and then run "tox" from this directory.
|
||||
|
||||
[tox]
|
||||
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/bijoe/
|
||||
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/bijoe/{env:BRANCH_NAME:}
|
||||
envlist = dj18,dj111
|
||||
|
||||
[testenv]
|
||||
usedevelop = true
|
||||
basepython = python2
|
||||
setenv =
|
||||
DJANGO_SETTINGS_MODULE=bijoe.settings
|
||||
coverage: COVERAGE=--junit-xml=test_results.xml --cov=bijoe --cov-report xml
|
||||
|
@ -24,6 +25,7 @@ deps =
|
|||
pytest-random
|
||||
pytest-django
|
||||
WebTest
|
||||
dj18,dj19,dj110: django-webtest<1.9.3
|
||||
django-webtest<1.9.3
|
||||
commands =
|
||||
py.test {env:COVERAGE:} {posargs:--nomigrations --random tests}
|
||||
dj111: py.test {posargs: --junitxml=test_{envname}_results.xml --cov-report xml --cov-report html --cov=bijoe --random tests/}
|
||||
dj18: py.test {posargs: --junitxml=test_{envname}_results.xml --random tests/}
|
||||
|
|
Loading…
Reference in New Issue