Another Jenkisfile error
Change-Id: I313f1471aad166c794374c7d381c1b66a4395b4d Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25839 Tested-by: Bjoern Pedersen <bjoern.pedersen@frm2.tum.de> Reviewed-by: Bjoern Pedersen <bjoern.pedersen@frm2.tum.de>
This commit is contained in:
14
ci/Jenkinsfile
vendored
14
ci/Jenkinsfile
vendored
@ -30,7 +30,8 @@ def changedFiles = '';
|
|||||||
|
|
||||||
def run_pylint(pyver) {
|
def run_pylint(pyver) {
|
||||||
stage ('pylint-' + pyver) {
|
stage ('pylint-' + pyver) {
|
||||||
gerritPostCheck(["jenkins:pylint_${pyver}":"RUNNING"])
|
def cpylint = "RUNNING"
|
||||||
|
gerritPostCheck(["jenkins:pylint_${pyver}": cpylint])
|
||||||
def status = 'OK'
|
def status = 'OK'
|
||||||
changedFiles = sh returnStdout: true, script: '''\
|
changedFiles = sh returnStdout: true, script: '''\
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
@ -69,7 +70,7 @@ fi
|
|||||||
|
|
||||||
echo "pylint result: $res"
|
echo "pylint result: $res"
|
||||||
this.verifyresult.put('pylint'+pyver, 1)
|
this.verifyresult.put('pylint'+pyver, 1)
|
||||||
def cplyint ="SUCCESSFULL"
|
cpylint = "SUCCESSFULL"
|
||||||
if ( res != 0 ) {
|
if ( res != 0 ) {
|
||||||
currentBuild.result='FAILURE'
|
currentBuild.result='FAILURE'
|
||||||
this.verifyresult.put('pylint'+ pyver, -1)
|
this.verifyresult.put('pylint'+ pyver, -1)
|
||||||
@ -97,13 +98,13 @@ fi
|
|||||||
|
|
||||||
def run_tests(pyver) {
|
def run_tests(pyver) {
|
||||||
stage('Test:' + pyver) {
|
stage('Test:' + pyver) {
|
||||||
|
def cpytest = "RUNNING"
|
||||||
gerritPostCheck(["jenkins:pytest_${pyver}":"RUNNING"])
|
gerritPostCheck(["jenkins:pytest_${pyver}":"RUNNING"])
|
||||||
writeFile file: 'setup.cfg', text: '''
|
writeFile file: 'setup.cfg', text: '''
|
||||||
[tool:pytest]
|
[tool:pytest]
|
||||||
addopts = --junit-xml=pytest.xml --junit-prefix=''' + pyver
|
addopts = --junit-xml=pytest.xml --junit-prefix=''' + pyver
|
||||||
|
|
||||||
def status = "OK"
|
def status = "OK"
|
||||||
def cpytest = "SUCCESSFULL"
|
|
||||||
verifyresult.put(pyver, 0)
|
verifyresult.put(pyver, 0)
|
||||||
try {
|
try {
|
||||||
timeout(5) {
|
timeout(5) {
|
||||||
@ -116,6 +117,7 @@ python3 setup.py develop
|
|||||||
make test
|
make test
|
||||||
'''
|
'''
|
||||||
verifyresult.put(pyver, 1)
|
verifyresult.put(pyver, 1)
|
||||||
|
cpytest = "SUCCESSFULL"
|
||||||
}
|
}
|
||||||
} catch (all) {
|
} catch (all) {
|
||||||
currentBuild.result = 'FAILURE'
|
currentBuild.result = 'FAILURE'
|
||||||
@ -124,12 +126,6 @@ make test
|
|||||||
verifyresult.put(pyver, -1)
|
verifyresult.put(pyver, -1)
|
||||||
}
|
}
|
||||||
gerritPostCheck(["jenkins:pytest_${pyver}":cpytest])
|
gerritPostCheck(["jenkins:pytest_${pyver}":cpytest])
|
||||||
gerritverificationpublisher([
|
|
||||||
verifyStatusValue: verifyresult[pyver],
|
|
||||||
verifyStatusCategory: 'test ',
|
|
||||||
verifyStatusName: 'pytest-'+pyver,
|
|
||||||
verifyStatusReporter: 'jenkins',
|
|
||||||
verifyStatusRerun: '!recheck'])
|
|
||||||
|
|
||||||
step([$class: 'JUnitResultArchiver', allowEmptyResults: true,
|
step([$class: 'JUnitResultArchiver', allowEmptyResults: true,
|
||||||
keepLongStdio: true, testResults: 'pytest.xml'])
|
keepLongStdio: true, testResults: 'pytest.xml'])
|
||||||
|
Reference in New Issue
Block a user