mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 17:50:20 +00:00
Upload coverage reports on full test runs
This commit is contained in:
parent
6e0b61baa9
commit
10283b4534
14 changed files with 36 additions and 42 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue