You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by ju...@apache.org on 2023/01/04 12:33:49 UTC
[jspwiki] 03/06: Add some colors to jenkins' console builds
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 50752e8c2e99808a312e00aa622e69b59543a6fb
Author: Juan Pablo Santos RodrÃguez <ju...@gmail.com>
AuthorDate: Wed Jan 4 12:59:06 2023 +0100
Add some colors to jenkins' console builds
---
Jenkinsfile | 64 +++++++++++++++++++++++++++++++------------------------------
1 file changed, 33 insertions(+), 31 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index b7c76a1e1..edf10f6f1 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -24,43 +24,45 @@ buildJdk19 = 'jdk_19_latest'
buildMvn = 'maven_3_latest'
errMsg = ''
-try {
+ansiColor( 'xterm' ) {
+ try {
- stage( "build source" ) {
- parallel jdk11Build: {
- buildAndSonarWith( buildJdk11 )
- },
- jdk17Build: {
- buildWith( buildJdk17 )
- },
- jdk19Build: {
- // don't fail build if jdk-19 build doesn't succeed
- catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
- buildWith( buildJdk19 )
+ stage( 'build source' ) {
+ parallel jdk11Build: {
+ buildAndSonarWith( buildJdk11 )
+ },
+ jdk17Build: {
+ buildWith( buildJdk17 )
+ },
+ jdk19Build: {
+ // don't fail build if jdk-19 build doesn't succeed
+ catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
+ buildWith( buildJdk19 )
+ }
}
}
- }
- if( env.BRANCH_NAME == 'master' ) {
- build wait: false, job: 'JSPWiki/site', parameters: [ text( name: 'version', value: 'master' ) ]
- }
+ if( env.BRANCH_NAME == 'master' ) {
+ build wait: false, job: 'JSPWiki/site', parameters: [ text( name: 'version', value: 'master' ) ]
+ }
- currentBuild.result = 'SUCCESS'
+ currentBuild.result = 'SUCCESS'
-} catch( Exception err ) {
- currentBuild.result = 'FAILURE'
- echo err.message
- errMsg = '- ' + err.message
-} finally {
- node( 'ubuntu' ) {
- if( currentBuild.result == null ) {
- currentBuild.result = 'ABORTED'
- }
- if( env.BRANCH_NAME == 'master' ) {
- emailext body: "See ${env.BUILD_URL} $errMsg",
- replyTo: 'dev@jspwiki.apache.org',
- to: 'commits@jspwiki.apache.org',
- subject: "[${env.JOB_NAME}] build ${env.BUILD_DISPLAY_NAME} - ${currentBuild.result}"
+ } catch( Exception err ) {
+ currentBuild.result = 'FAILURE'
+ echo err.message
+ errMsg = '- ' + err.message
+ } finally {
+ node( 'ubuntu' ) {
+ if( currentBuild.result == null ) {
+ currentBuild.result = 'ABORTED'
+ }
+ if( env.BRANCH_NAME == 'master' ) {
+ emailext body: "See ${env.BUILD_URL} $errMsg",
+ replyTo: 'dev@jspwiki.apache.org',
+ to: 'commits@jspwiki.apache.org',
+ subject: "[${env.JOB_NAME}] build ${env.BUILD_DISPLAY_NAME} - ${currentBuild.result}"
+ }
}
}
}