From 94aee924e2d6b57ce3ecf90d39114246c4f7ec70 Mon Sep 17 00:00:00 2001 From: Mick Semb Wever Date: Fri, 17 Apr 2020 19:06:22 +0200 Subject: [PATCH] Jenkins Test Results Report in plaintext for ASF ML MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit patch by Mick Semb Wever; reviewed by Eduard Tudenhöfner for CASSANDRA-15729 --- .jenkins/Jenkinsfile | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/.jenkins/Jenkinsfile b/.jenkins/Jenkinsfile index 5af2b5adfe..f7cbefca7b 100644 --- a/.jenkins/Jenkinsfile +++ b/.jenkins/Jenkinsfile @@ -21,7 +21,7 @@ // https://github.com/apache/cassandra-builds/blob/master/jenkins-dsl/cassandra_job_dsl_seed.groovy // // Validate/lint this file using the following command -// `curl -X POST -F "jenkinsfile=<.jenkins/Jenkinsfile" https://builds.apache.org/pipeline-model-converter/validate` +// `curl -X POST -F "jenkinsfile=<.jenkins/Jenkinsfile" https://ci-cassandra.apache.org/pipeline-model-converter/validate` pipeline { agent { label 'cassandra' } @@ -250,19 +250,33 @@ pipeline { } } } - } - stage('Summary') { - steps { - junit '**/TEST*.xml,**/cqlshlib.xml,**/nosetests.xml' - - // the following should fail on any installation other than builds.apache.org - // TODO: keep jenkins infrastructure related settings in `cassandra_job_dsl_seed.groovy` - warnError('cannot send notifications') { - slackSend channel: '#cassandra-builds', message: "${currentBuild.fullDisplayName} completed: ${currentBuild.result}. See ${env.BUILD_URL}" - emailext to: 'builds@cassandra.apache.org', subject: "Build complete: ${currentBuild.fullDisplayName} [${currentBuild.result}] ${env.GIT_COMMIT}", body: '${CHANGES}  ${JELLY_SCRIPT,template="text"}' - } } + stage('Summary') { + steps { + sh "git clone https://gitbox.apache.org/repos/asf/cassandra-builds.git" + sh "./cassandra-builds/build-scripts/cassandra-test-report.sh" + junit '**/build/test/**/TEST*.xml,**/cqlshlib.xml,**/nosetests.xml' + + // the following should fail on any installation other than builds.apache.org + // TODO: keep jenkins infrastructure related settings in `cassandra_job_dsl_seed.groovy` + warnError('cannot send notifications') { + slackSend channel: '#cassandra-builds', message: ":apache: <${env.BUILD_URL}|${currentBuild.fullDisplayName}> completed: ${currentBuild.result}. ${env.GIT_COMMIT}\n${CHANGES}" + emailext to: 'builds@cassandra.apache.org', subject: "Build complete: ${currentBuild.fullDisplayName} [${currentBuild.result}] ${env.GIT_COMMIT}", body: ''' +------------------------------------------------------------------------------- +Build ${ENV,var="JOB_NAME"} #${BUILD_NUMBER} ${BUILD_STATUS} +URL: ${BUILD_URL} +------------------------------------------------------------------------------- +Changes: +${CHANGES} +------------------------------------------------------------------------------- +Failed Tests: +${FAILED_TESTS,maxTests=500,showMessage=false,showStack=false} +------------------------------------------------------------------------------- +${FILE,path="cassandra-test-report.txt"} +''' + } } + } } }