summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2019-06-08 07:20:13 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2019-06-08 10:34:08 (GMT)
commit549aa8ee95fc180a7aef831a58852893f80c8a8b (patch)
treec525e27fb15e0f32ac0cf5491610e69502b2686d
parent64783e77eaf46a95f1a17bb38babc53245cf58fa (diff)
downloadauthentic2-auth-kerberos-master.zip
authentic2-auth-kerberos-master.tar.gz
authentic2-auth-kerberos-master.tar.bz2
use new Jenksinfile (#33811)HEADmaster
-rw-r--r--Jenkinsfile45
-rw-r--r--tox.ini2
2 files changed, 24 insertions, 23 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 16dddc6..f6af064 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -2,30 +2,33 @@
pipeline {
agent any
- options { disableConcurrentBuilds() }
+ options {
+ disableConcurrentBuilds()
+ skipDefaultCheckout()
+ }
environment {
- TMPDIR = "/tmp/$BUILD_TAG"
+ TMPDIR = "$WORKSPACE"
}
stages {
stage('Unit Tests') {
steps {
- sh "mkdir ${env.TMPDIR}"
- sh """
-virtualenv -p python3 ${env.TMPDIR}/venv/
-. ${env.TMPDIR}/venv/bin/activate
-${env.TMPDIR}/venv/bin/pip install tox
-PGPORT=`python -c 'import struct; import socket; s=socket.socket(); s.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, struct.pack("ii", 1, 0)); s.bind(("", 0)); print(s.getsockname()[1]); s.close()'` pg_virtualenv -o fsync=off ${env.TMPDIR}/venv/bin/tox -rv"""
+ cleanWs()
+ dir ("repository") {
+ checkout scm
+ tox()
+ }
}
post {
always {
- script {
- utils = new Utils()
- utils.publish_coverage('coverage.xml')
- utils.publish_coverage_native('index.html')
- utils.publish_pylint('pylint.out')
+ dir("repository") {
+ script {
+ utils = new Utils()
+ utils.publish_coverage('coverage.xml')
+ utils.publish_coverage_native('index.html')
+ utils.publish_pylint('pylint.out')
+ }
+ mergeJunitResults()
}
- sh './merge-junit-results.py junit-*.xml >junit.xml'
- junit 'junit.xml'
}
}
}
@@ -41,14 +44,12 @@ PGPORT=`python -c 'import struct; import socket; s=socket.socket(); s.setsockopt
}
post {
always {
- script {
- utils = new Utils()
- utils.mail_notify(currentBuild, env, 'admin+jenkins-authentic2-auth-kerberos@entrouvert.com')
+ dir("repository") {
+ script {
+ utils = new Utils()
+ utils.mail_notify(currentBuild, env, 'admin+jenkins-authentic2-auth-kerberos@entrouvert.com')
+ }
}
}
- success {
- sh "rm -rf ${env.TMPDIR}"
- cleanWs()
- }
}
}
diff --git a/tox.ini b/tox.ini
index d2da311..bb360d1 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,7 +5,7 @@
[tox]
-toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/authentic2-auth-kerberos/{env:BRANCH_NAME:}
+toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/authentic2-auth-kerberos/
envlist = py27-coverage-{dj18,dj111}-{pg,sqlite}-{oldldap,},pylint
[testenv]