Upload coverage reports on full test runs

This commit is contained in:
Pedro Algarvio 2019-04-25 14:35:43 +01:00
parent 6e0b61baa9
commit 10283b4534
No known key found for this signature in database
GPG key ID: BB36BF6584A298FF
14 changed files with 36 additions and 42 deletions

View file

@ -69,19 +69,17 @@ timeout(time: 8, unit: 'HOURS') {
}
archiveArtifacts artifacts: 'artifacts/*,artifacts/**/*'
}
/* Code coverage uploads disabled because we're not running the full test suite
stage('report code coverage') {
script {
withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) {
sh '''
if [ -f artifacts/coverage/coverage.xml ]; then
if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then
curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}"
fi
'''
}
}
}
*/
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
@ -117,3 +115,4 @@ timeout(time: 8, unit: 'HOURS') {
}
}
// vi: ft=groovy

View file

@ -69,19 +69,17 @@ timeout(time: 8, unit: 'HOURS') {
}
archiveArtifacts artifacts: 'artifacts/*,artifacts/**/*'
}
/* Code coverage uploads disabled because we're not running the full test suite
stage('report code coverage') {
script {
withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) {
sh '''
if [ -f artifacts/coverage/coverage.xml ]; then
if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then
curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}"
fi
'''
}
}
}
*/
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
@ -116,3 +114,5 @@ timeout(time: 8, unit: 'HOURS') {
}
}
}
// vi: ft=groovy

View file

@ -69,19 +69,17 @@ timeout(time: 6, unit: 'HOURS') {
}
archiveArtifacts artifacts: 'artifacts/*,artifacts/**/*'
}
/* Code coverage uploads disabled because we're not running the full test suite
stage('report code coverage') {
script {
withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) {
sh '''
if [ -f artifacts/coverage/coverage.xml ]; then
if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then
curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}"
fi
'''
}
}
}
*/
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
@ -116,3 +114,5 @@ timeout(time: 6, unit: 'HOURS') {
}
}
}
// vi: ft=groovy

View file

@ -69,19 +69,17 @@ timeout(time: 8, unit: 'HOURS') {
}
archiveArtifacts artifacts: 'artifacts/*,artifacts/**/*'
}
/* Code coverage uploads disabled because we're not running the full test suite
stage('report code coverage') {
script {
withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) {
sh '''
if [ -f artifacts/coverage/coverage.xml ]; then
if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then
curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}"
fi
'''
}
}
}
*/
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
@ -117,3 +115,4 @@ timeout(time: 8, unit: 'HOURS') {
}
}
// vi: ft=groovy

View file

@ -69,19 +69,17 @@ timeout(time: 6, unit: 'HOURS') {
}
archiveArtifacts artifacts: 'artifacts/*,artifacts/**/*'
}
/* Code coverage uploads disabled because we're not running the full test suite
stage('report code coverage') {
script {
withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) {
sh '''
if [ -f artifacts/coverage/coverage.xml ]; then
if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then
curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}"
fi
'''
}
}
}
*/
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
@ -117,3 +115,4 @@ timeout(time: 6, unit: 'HOURS') {
}
}
// vi: ft=groovy

View file

@ -69,19 +69,17 @@ timeout(time: 6, unit: 'HOURS') {
}
archiveArtifacts artifacts: 'artifacts/*,artifacts/**/*'
}
/* Code coverage uploads disabled because we're not running the full test suite
stage('report code coverage') {
script {
withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) {
sh '''
if [ -f artifacts/coverage/coverage.xml ]; then
if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then
curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}"
fi
'''
}
}
}
*/
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
@ -117,3 +115,4 @@ timeout(time: 6, unit: 'HOURS') {
}
}
// vi: ft=groovy

View file

@ -69,19 +69,17 @@ timeout(time: 6, unit: 'HOURS') {
}
archiveArtifacts artifacts: 'artifacts/*,artifacts/**/*'
}
/* Code coverage uploads disabled because we're not running the full test suite
stage('report code coverage') {
script {
withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) {
sh '''
if [ -f artifacts/coverage/coverage.xml ]; then
if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then
curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}"
fi
'''
}
}
}
*/
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
@ -117,3 +115,4 @@ timeout(time: 6, unit: 'HOURS') {
}
}
// vi: ft=groovy

View file

@ -69,19 +69,17 @@ timeout(time: 6, unit: 'HOURS') {
}
archiveArtifacts artifacts: 'artifacts/*,artifacts/**/*'
}
/* Code coverage uploads disabled because we're not running the full test suite
stage('report code coverage') {
script {
withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) {
sh '''
if [ -f artifacts/coverage/coverage.xml ]; then
if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then
curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}"
fi
'''
}
}
}
*/
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
@ -117,3 +115,4 @@ timeout(time: 6, unit: 'HOURS') {
}
}
// vi: ft=groovy

View file

@ -69,19 +69,17 @@ timeout(time: 6, unit: 'HOURS') {
}
archiveArtifacts artifacts: 'artifacts/*,artifacts/**/*'
}
/* Code coverage uploads disabled because we're not running the full test suite
stage('report code coverage') {
script {
withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) {
sh '''
if [ -f artifacts/coverage/coverage.xml ]; then
if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then
curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}"
fi
'''
}
}
}
*/
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
@ -116,3 +114,5 @@ timeout(time: 6, unit: 'HOURS') {
}
}
}
// vi: ft=groovy

View file

@ -69,19 +69,17 @@ timeout(time: 6, unit: 'HOURS') {
}
archiveArtifacts artifacts: 'artifacts/*,artifacts/**/*'
}
/* Code coverage uploads disabled because we're not running the full test suite
stage('report code coverage') {
script {
withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) {
sh '''
if [ -f artifacts/coverage/coverage.xml ]; then
if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then
curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}"
fi
'''
}
}
}
*/
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
@ -116,3 +114,5 @@ timeout(time: 6, unit: 'HOURS') {
}
}
}
// vi: ft=groovy

View file

@ -69,19 +69,17 @@ timeout(time: 6, unit: 'HOURS') {
}
archiveArtifacts artifacts: 'artifacts/*,artifacts/**/*'
}
/* Code coverage uploads disabled because we're not running the full test suite
stage('report code coverage') {
script {
withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) {
sh '''
if [ -f artifacts/coverage/coverage.xml ]; then
if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then
curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}"
fi
'''
}
}
}
*/
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
@ -116,3 +114,5 @@ timeout(time: 6, unit: 'HOURS') {
}
}
}
// vi: ft=groovy

View file

@ -69,19 +69,17 @@ timeout(time: 6, unit: 'HOURS') {
}
archiveArtifacts artifacts: 'artifacts/*,artifacts/**/*'
}
/* Code coverage uploads disabled because we're not running the full test suite
stage('report code coverage') {
script {
withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) {
sh '''
if [ -f artifacts/coverage/coverage.xml ]; then
if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then
curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}"
fi
'''
}
}
}
*/
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
@ -116,3 +114,5 @@ timeout(time: 6, unit: 'HOURS') {
}
}
}
// vi: ft=groovy

View file

@ -68,19 +68,17 @@ timeout(time: 6, unit: 'HOURS') {
}
archiveArtifacts artifacts: 'artifacts/*,artifacts/**/*'
}
/* Code coverage uploads disabled because we're not running the full test suite
stage('report code coverage') {
script {
withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) {
sh '''
if [ -f artifacts/coverage/coverage.xml ]; then
if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then
curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}"
fi
'''
}
}
}
*/
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
@ -115,3 +113,5 @@ timeout(time: 6, unit: 'HOURS') {
}
}
}
// vi: ft=groovy

View file

@ -68,19 +68,17 @@ timeout(time: 8, unit: 'HOURS') {
}
archiveArtifacts artifacts: 'artifacts/*,artifacts/**/*'
}
/* Code coverage uploads disabled because we're not running the full test suite
stage('report code coverage') {
script {
withCredentials([[$class: 'StringBinding', credentialsId: 'codecov-upload-token-salt', variable: 'CODECOV_TOKEN']]) {
sh '''
if [ -f artifacts/coverage/coverage.xml ]; then
if [ -n "${FORCE_FULL}" -a "${FORCE_FULL}" = "true" -a -f artifacts/coverage/coverage.xml ]; then
curl -L https://codecov.io/bash | /bin/sh -s -- -R $(pwd) -s artifacts/coverage/ -F "${CODECOV_FLAGS}"
fi
'''
}
}
}
*/
}
} catch (Exception e) {
currentBuild.result = 'FAILURE'
@ -115,3 +113,5 @@ timeout(time: 8, unit: 'HOURS') {
}
}
}
// vi: ft=groovy