ci: choose launched tests depending on context (#47048)

* locally : only authentic on the production environment
* on jenkins : django-rbac and authentic on the production environment
* on jenkins at night : everything we can, notably future environment
  (django 2.2)
This commit is contained in:
Benjamin Dauvergne 2020-09-25 17:35:11 +02:00
parent 3b5ec1d076
commit 6d0aa4dbbc
2 changed files with 4 additions and 5 deletions

2
Jenkinsfile vendored
View File

@ -14,7 +14,7 @@ pipeline {
sh """
python3 -m venv ${env.TMPDIR}/venv/
${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 -r -e rbac-py3-dj111,authentic-py3-dj111-drf34,pylint"""
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 -r -e rbac-py3-dj111,authentic-py3-dj111-drf39,pylint"""
}
post {
always {

View File

@ -6,17 +6,16 @@
[tox]
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/authentic/
envlist =
rbac-py3-{dj111,dj22}
authentic-py3-dj111-drf34
authentic-py3-dj22-drf39
authentic-py3-dj111-drf39
[tox:jenkins]
envlist =
pylint
rbac-py3-dj111
rbac-py3-dj22
authentic-py3-dj111-drf34
authentic-py3-dj111-drf39
authentic-py3-dj22-drf39
[testenv]