summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2019-05-31 14:52:12 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2019-05-31 21:35:56 (GMT)
commitec51dd2191508ec7442964bf82b913077f041aad (patch)
treed077dfd9391e1f5f66b33fe5cf7451f50947c132
parent9c73d72476dffedf68c779ab41b3bff403901d57 (diff)
downloadjenkins-lib-ec51dd2191508ec7442964bf82b913077f041aad.zip
jenkins-lib-ec51dd2191508ec7442964bf82b913077f041aad.tar.gz
jenkins-lib-ec51dd2191508ec7442964bf82b913077f041aad.tar.bz2
add a tox step (#33596)
-rw-r--r--vars/tox.groovy7
1 files changed, 7 insertions, 0 deletions
diff --git a/vars/tox.groovy b/vars/tox.groovy
new file mode 100644
index 0000000..c26fcf3
--- /dev/null
+++ b/vars/tox.groovy
@@ -0,0 +1,7 @@
+def call() {
+ tmpdir = env.TMPDIR ? env.TMPDIR : '.'
+ sh """
+virtualenv -p python3 ${tmpdir}/venv/
+${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 ${tmpdir}/venv/bin/tox -rv"""
+}