annotate Jenkinsfile @ 6835:2f35bd7b97aa

js: use body as container for Bootstrap tooltips Under some circumstances, the floating of the elements gets altered, if the tooltip elements gets put next to the source element. Therefore use body as the container.
author domruf <dominikruf@gmail.com>
date Tue, 18 Jul 2017 20:50:49 +0200
parents 8a60eb2b7603
children 0acb46763886
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6583
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
1 def createvirtualenv = ''
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
2 def activatevirtualenv = ''
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
3
6536
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
4 node {
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
5 if (isUnix()) {
6550
ad275fcc5a90 jenkinsfile: create venv in special folder instead of jenkins workspace
domruf <dominikruf@gmail.com>
parents: 6549
diff changeset
6 createvirtualenv = 'rm -r $JENKINS_HOME/venv/$JOB_NAME || true && virtualenv $JENKINS_HOME/venv/$JOB_NAME'
ad275fcc5a90 jenkinsfile: create venv in special folder instead of jenkins workspace
domruf <dominikruf@gmail.com>
parents: 6549
diff changeset
7 activatevirtualenv = '. $JENKINS_HOME/venv/$JOB_NAME/bin/activate'
6536
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
8 } else {
6550
ad275fcc5a90 jenkinsfile: create venv in special folder instead of jenkins workspace
domruf <dominikruf@gmail.com>
parents: 6549
diff changeset
9 createvirtualenv = 'rmdir /s /q %JENKINS_HOME%\\venv\\%JOB_NAME% || true && virtualenv %JENKINS_HOME%\\venv\\%JOB_NAME%'
ad275fcc5a90 jenkinsfile: create venv in special folder instead of jenkins workspace
domruf <dominikruf@gmail.com>
parents: 6549
diff changeset
10 activatevirtualenv = 'call %JENKINS_HOME%\\venv\\%JOB_NAME%\\Scripts\\activate.bat'
6536
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
11 }
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
12
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
13 stage('checkout') {
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
14 checkout scm
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
15 if (isUnix()) {
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
16 sh 'hg --config extensions.purge= purge --all'
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
17 } else {
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
18 bat 'hg --config extensions.purge= purge --all'
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
19 }
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
20 }
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
21 stage('virtual env') {
6550
ad275fcc5a90 jenkinsfile: create venv in special folder instead of jenkins workspace
domruf <dominikruf@gmail.com>
parents: 6549
diff changeset
22 def virtualenvscript = """$createvirtualenv
6536
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
23 $activatevirtualenv
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
24 python -m pip install --upgrade pip
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
25 pip install --upgrade setuptools
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
26 pip install --upgrade pylint
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
27 pip install --upgrade pytest-cov
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
28 """
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
29 if (isUnix()) {
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
30 virtualenvscript += """
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
31 pip install --upgrade python-ldap
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
32 pip install --upgrade python-pam
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
33 """
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
34 sh virtualenvscript
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
35 } else {
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
36 bat virtualenvscript
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
37 }
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
38 }
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
39 stage('setup') {
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
40 def virtualenvscript = """$activatevirtualenv
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
41 pip install --upgrade -e .
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
42 pip install -r dev_requirements.txt
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
43 python setup.py compile_catalog
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
44 """
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
45 if (isUnix()) {
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
46 sh virtualenvscript
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
47 } else {
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
48 bat virtualenvscript
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
49 }
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
50 stash name: 'kallithea', useDefaultExcludes: false
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
51 }
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
52 stage('pylint') {
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
53 sh script: """$activatevirtualenv
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
54 pylint -j 0 --disable=C -f parseable kallithea > pylint.out
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
55 """, returnStatus: true
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
56 archiveArtifacts 'pylint.out'
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
57 try {
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
58 step([$class: 'WarningsPublisher', canComputeNew: false, canResolveRelativePaths: false, defaultEncoding: '', excludePattern: '', healthy: '', includePattern: '', messagesPattern: '', parserConfigurations: [[parserName: 'PyLint', pattern: 'pylint.out']], unHealthy: ''])
6551
bc1b11a5d548 jenkinsfile: catch the correct exception if jenkins plugin is not available
domruf <dominikruf@gmail.com>
parents: 6550
diff changeset
59 } catch (java.lang.IllegalArgumentException exc) {
6536
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
60 echo "You need to install the 'Warnings Plug-in' to display the pylint report."
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
61 currentBuild.result = 'UNSTABLE'
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
62 echo "Caught: ${exc}"
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
63 }
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
64 }
6583
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
65 }
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
66
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
67 def pytests = [:]
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
68 pytests['sqlite'] = {
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
69 node {
6536
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
70 ws {
6552
15a12f2a47b4 jenkinsfile: delete all old files in the workspace
domruf <dominikruf@gmail.com>
parents: 6551
diff changeset
71 deleteDir()
6536
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
72 unstash name: 'kallithea'
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
73 if (isUnix()) {
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
74 sh script: """$activatevirtualenv
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
75 py.test -p no:sugar --cov-config .coveragerc --junit-xml=pytest_sqlite.xml --cov=kallithea --cov-report xml
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
76 """, returnStatus: true
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
77 } else {
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
78 bat script: """$activatevirtualenv
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
79 py.test -p no:sugar --cov-config .coveragerc --junit-xml=pytest_sqlite.xml --cov=kallithea --cov-report xml
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
80 """, returnStatus: true
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
81 }
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
82 sh 'sed --in-place "s/\\(classname=[\'\\"]\\)/\\1SQLITE./g" pytest_sqlite.xml'
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
83 archiveArtifacts 'pytest_sqlite.xml'
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
84 junit 'pytest_sqlite.xml'
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
85 try {
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
86 step([$class: 'CoberturaPublisher', autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'coverage.xml', failNoReports: false, failUnhealthy: false, failUnstable: false, maxNumberOfBuilds: 0, onlyStable: false, zoomCoverageChart: false])
6551
bc1b11a5d548 jenkinsfile: catch the correct exception if jenkins plugin is not available
domruf <dominikruf@gmail.com>
parents: 6550
diff changeset
87 } catch (java.lang.IllegalArgumentException exc) {
6536
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
88 echo "You need to install the pipeline compatible 'CoberturaPublisher Plug-in' to display the coverage report."
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
89 currentBuild.result = 'UNSTABLE'
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
90 echo "Caught: ${exc}"
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
91 }
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
92 }
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
93 }
6583
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
94 }
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
95
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
96 pytests['de'] = {
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
97 node {
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
98 if (isUnix()) {
6536
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
99 ws {
6552
15a12f2a47b4 jenkinsfile: delete all old files in the workspace
domruf <dominikruf@gmail.com>
parents: 6551
diff changeset
100 deleteDir()
6536
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
101 unstash name: 'kallithea'
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
102 withEnv(['LANG=de_DE.UTF-8',
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
103 'LANGUAGE=de',
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
104 'LC_ADDRESS=de_DE.UTF-8',
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
105 'LC_IDENTIFICATION=de_DE.UTF-8',
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
106 'LC_MEASUREMENT=de_DE.UTF-8',
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
107 'LC_MONETARY=de_DE.UTF-8',
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
108 'LC_NAME=de_DE.UTF-8',
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
109 'LC_NUMERIC=de_DE.UTF-8',
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
110 'LC_PAPER=de_DE.UTF-8',
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
111 'LC_TELEPHONE=de_DE.UTF-8',
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
112 'LC_TIME=de_DE.UTF-8',
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
113 ]) {
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
114 sh script: """$activatevirtualenv
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
115 py.test -p no:sugar --cov-config .coveragerc --junit-xml=pytest_de.xml --cov=kallithea --cov-report xml
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
116 """, returnStatus: true
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
117 }
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
118 sh 'sed --in-place "s/\\(classname=[\'\\"]\\)/\\1DE./g" pytest_de.xml'
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
119 archiveArtifacts 'pytest_de.xml'
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
120 junit 'pytest_de.xml'
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
121 }
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
122 }
6583
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
123 }
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
124 }
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
125 pytests['mysql'] = {
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
126 node {
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
127 if (isUnix()) {
6536
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
128 ws {
6552
15a12f2a47b4 jenkinsfile: delete all old files in the workspace
domruf <dominikruf@gmail.com>
parents: 6551
diff changeset
129 deleteDir()
6536
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
130 unstash name: 'kallithea'
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
131 sh """$activatevirtualenv
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
132 pip install --upgrade MySQL-python
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
133 """
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
134 withEnv(['TEST_DB=mysql://kallithea:kallithea@jenkins_mysql/kallithea_test?charset=utf8']) {
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
135 if (isUnix()) {
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
136 sh script: """$activatevirtualenv
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
137 py.test -p no:sugar --cov-config .coveragerc --junit-xml=pytest_mysql.xml --cov=kallithea --cov-report xml
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
138 """, returnStatus: true
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
139 } else {
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
140 bat script: """$activatevirtualenv
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
141 py.test -p no:sugar --cov-config .coveragerc --junit-xml=pytest_mysql.xml --cov=kallithea --cov-report xml
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
142 """, returnStatus: true
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
143 }
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
144 }
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
145 sh 'sed --in-place "s/\\(classname=[\'\\"]\\)/\\1MYSQL./g" pytest_mysql.xml'
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
146 archiveArtifacts 'pytest_mysql.xml'
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
147 junit 'pytest_mysql.xml'
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
148 }
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
149 }
6583
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
150 }
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
151 }
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
152 pytests['postgresql'] = {
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
153 node {
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
154 if (isUnix()) {
6536
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
155 ws {
6552
15a12f2a47b4 jenkinsfile: delete all old files in the workspace
domruf <dominikruf@gmail.com>
parents: 6551
diff changeset
156 deleteDir()
6536
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
157 unstash name: 'kallithea'
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
158 sh """$activatevirtualenv
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
159 pip install --upgrade psycopg2
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
160 """
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
161 withEnv(['TEST_DB=postgresql://kallithea:kallithea@jenkins_postgresql/kallithea_test']) {
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
162 if (isUnix()) {
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
163 sh script: """$activatevirtualenv
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
164 py.test -p no:sugar --cov-config .coveragerc --junit-xml=pytest_postgresql.xml --cov=kallithea --cov-report xml
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
165 """, returnStatus: true
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
166 } else {
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
167 bat script: """$activatevirtualenv
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
168 py.test -p no:sugar --cov-config .coveragerc --junit-xml=pytest_postgresql.xml --cov=kallithea --cov-report xml
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
169 """, returnStatus: true
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
170 }
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
171 }
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
172 sh 'sed --in-place "s/\\(classname=[\'\\"]\\)/\\1POSTGRES./g" pytest_postgresql.xml'
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
173 archiveArtifacts 'pytest_postgresql.xml'
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
174 junit 'pytest_postgresql.xml'
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
175 }
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
176 }
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
177 }
8d788789b38a tests: add Jenkinsfile for automatic creation of Jenkins projects for testing Kallithea itself
domruf <dominikruf@gmail.com>
parents:
diff changeset
178 }
6583
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
179 stage('Tests') {
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
180 parallel pytests
8a60eb2b7603 Jenkinsfile: run each py.test on a separate executor
domruf <dominikruf@gmail.com>
parents: 6552
diff changeset
181 }