From 10283b4534c22c8bffba73763890ed10710f018e Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 25 Apr 2019 14:35:43 +0100 Subject: [PATCH] Upload coverage reports on full test runs --- .ci/kitchen-centos6-py2 | 5 ++--- .ci/kitchen-centos7-py2 | 6 +++--- .ci/kitchen-centos7-py3 | 6 +++--- .ci/kitchen-debian8-py2 | 5 ++--- .ci/kitchen-debian8-py3 | 5 ++--- .ci/kitchen-debian9-py2 | 5 ++--- .ci/kitchen-debian9-py3 | 5 ++--- .ci/kitchen-ubuntu1404-py2 | 5 ++--- .ci/kitchen-ubuntu1604-py2 | 6 +++--- .ci/kitchen-ubuntu1604-py3 | 6 +++--- .ci/kitchen-ubuntu1804-py2 | 6 +++--- .ci/kitchen-ubuntu1804-py3 | 6 +++--- .ci/kitchen-windows2016-py2 | 6 +++--- .ci/kitchen-windows2016-py3 | 6 +++--- 14 files changed, 36 insertions(+), 42 deletions(-) diff --git a/.ci/kitchen-centos6-py2 b/.ci/kitchen-centos6-py2 index bdd331d2588..5623fb8a32a 100644 --- a/.ci/kitchen-centos6-py2 +++ b/.ci/kitchen-centos6-py2 @@ -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 diff --git a/.ci/kitchen-centos7-py2 b/.ci/kitchen-centos7-py2 index e233a6979fa..e411a8cf2c4 100644 --- a/.ci/kitchen-centos7-py2 +++ b/.ci/kitchen-centos7-py2 @@ -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 diff --git a/.ci/kitchen-centos7-py3 b/.ci/kitchen-centos7-py3 index 00d2adc52a0..ea7dba63754 100644 --- a/.ci/kitchen-centos7-py3 +++ b/.ci/kitchen-centos7-py3 @@ -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 diff --git a/.ci/kitchen-debian8-py2 b/.ci/kitchen-debian8-py2 index f4af9fa00f3..d037e27dbea 100644 --- a/.ci/kitchen-debian8-py2 +++ b/.ci/kitchen-debian8-py2 @@ -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 diff --git a/.ci/kitchen-debian8-py3 b/.ci/kitchen-debian8-py3 index fb3c14667d2..265d839f7eb 100644 --- a/.ci/kitchen-debian8-py3 +++ b/.ci/kitchen-debian8-py3 @@ -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 diff --git a/.ci/kitchen-debian9-py2 b/.ci/kitchen-debian9-py2 index 034b9f8465f..904881ef455 100644 --- a/.ci/kitchen-debian9-py2 +++ b/.ci/kitchen-debian9-py2 @@ -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 diff --git a/.ci/kitchen-debian9-py3 b/.ci/kitchen-debian9-py3 index 5a55483c633..725fe009f66 100644 --- a/.ci/kitchen-debian9-py3 +++ b/.ci/kitchen-debian9-py3 @@ -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 diff --git a/.ci/kitchen-ubuntu1404-py2 b/.ci/kitchen-ubuntu1404-py2 index e75e211d638..a258f91c76c 100644 --- a/.ci/kitchen-ubuntu1404-py2 +++ b/.ci/kitchen-ubuntu1404-py2 @@ -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 diff --git a/.ci/kitchen-ubuntu1604-py2 b/.ci/kitchen-ubuntu1604-py2 index 2fa21ebf567..30403ce96a2 100644 --- a/.ci/kitchen-ubuntu1604-py2 +++ b/.ci/kitchen-ubuntu1604-py2 @@ -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 diff --git a/.ci/kitchen-ubuntu1604-py3 b/.ci/kitchen-ubuntu1604-py3 index 710b3e00c58..80a1734d468 100644 --- a/.ci/kitchen-ubuntu1604-py3 +++ b/.ci/kitchen-ubuntu1604-py3 @@ -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 diff --git a/.ci/kitchen-ubuntu1804-py2 b/.ci/kitchen-ubuntu1804-py2 index d4cbeb46993..82c6cdf96f6 100644 --- a/.ci/kitchen-ubuntu1804-py2 +++ b/.ci/kitchen-ubuntu1804-py2 @@ -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 diff --git a/.ci/kitchen-ubuntu1804-py3 b/.ci/kitchen-ubuntu1804-py3 index 691ce9c9a87..ef1d1722dd6 100644 --- a/.ci/kitchen-ubuntu1804-py3 +++ b/.ci/kitchen-ubuntu1804-py3 @@ -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 diff --git a/.ci/kitchen-windows2016-py2 b/.ci/kitchen-windows2016-py2 index c65ec8037e1..72f2c8910b2 100644 --- a/.ci/kitchen-windows2016-py2 +++ b/.ci/kitchen-windows2016-py2 @@ -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 diff --git a/.ci/kitchen-windows2016-py3 b/.ci/kitchen-windows2016-py3 index 93f274bbc28..ce76d243cc0 100644 --- a/.ci/kitchen-windows2016-py3 +++ b/.ci/kitchen-windows2016-py3 @@ -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