This is an automated email from the ASF dual-hosted git repository. mattsicker pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 83ac32af989907761477ddffa3f2aacb3169bc80 Author: Matt Sicker <[email protected]> AuthorDate: Fri Apr 3 20:08:37 2020 -0500 Clean up Jenkins pipelines --- Jenkinsfile | 65 +++++++++++-------------------------------- toolchains-jenkins-ubuntu.xml | 52 ++++++++++++++++++++++++++-------- toolchains-jenkins-win.xml | 55 ++++++++++++++++++++++++++++++------ 3 files changed, 104 insertions(+), 68 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ac900ce..cd7cbed 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,7 +18,9 @@ pipeline { options { - timeout time: 60, unit: 'MINUTES' + ansiColor('xterm') + buildDiscarder logRotator(numToKeepStr: '10') + timeout(90) } agent none stages { @@ -26,69 +28,34 @@ pipeline { failFast true parallel { stage('Ubuntu') { - agent { label 'ubuntu&&!H20' } - tools { - // https://cwiki.apache.org/confluence/display/INFRA/JDK+Installation+Matrix - jdk 'JDK 1.8 (latest)' - // https://cwiki.apache.org/confluence/display/INFRA/Maven+Installation+Matrix - maven 'Maven 3 (latest)' - } + agent { label 'ubuntu' } steps { - ansiColor('xterm') { - sh 'mvn -t toolchains-jenkins-ubuntu.xml -Djenkins -V install' - junit '*/target/*-reports/*.xml' - stash includes: 'target/**', name: 'target' + withMaven { + sh 'mvn -B -t toolchains-jenkins-ubuntu.xml -Djenkins -V install' } } - } - stage('IBM JDK') { - agent { label 'ubuntu&&!H20' } - tools { - jdk 'IBM 1.8 64-bit (on Ubuntu only)' - maven 'Maven 3 (latest)' - } - steps { - ansiColor('xterm') { - sh 'mvn -t toolchains-jenkins-ibm.xml -Djenkins -V install' - junit '*/target/*-reports/*.xml' + post { + always { + //junit '*/target/*-reports/*.xml' + recordIssues tools: [cpd(), checkStyle(), pmdParser(), mavenConsole(), errorProne()] } } } stage('Windows') { agent { label 'Windows' } - tools { - // https://cwiki.apache.org/confluence/display/INFRA/JDK+Installation+Matrix - jdk 'JDK 1.8 (latest)' - // https://cwiki.apache.org/confluence/display/INFRA/Maven+Installation+Matrix - maven 'Maven 3 (latest)' - } steps { bat 'if exist %userprofile%\\.embedmongo\\ rd /s /q %userprofile%\\.embedmongo' - bat 'mvn -t toolchains-jenkins-win.xml -V -Dfile.encoding=UTF-8 install' - junit '*/target/*-reports/*.xml' + withMaven { + bat 'mvn -B -t toolchains-jenkins-win.xml -V -Dfile.encoding=UTF-8 install' + } } } } } - stage('Deploy') { - when { branch 'master' } - tools { - // https://cwiki.apache.org/confluence/display/INFRA/JDK+Installation+Matrix - jdk 'JDK 1.8 (latest)' - // https://cwiki.apache.org/confluence/display/INFRA/Maven+Installation+Matrix - maven 'Maven 3 (latest)' - } - steps { - ansiColor('xterm') { - unstash 'target' - sh 'mvn -t toolchains-jenkins-ubuntu.xml -Djenkins -DskipTests -V deploy' - } + post { + failure { + slackSend channel: 'logging', message: "Jenkins build failure: ${env.BUILD_URL}" } -// post { -// failure { -// emailext body: "See <${env.BUILD_URL}>", replyTo: '[email protected]', subject: "[Log4j] Jenkins build failure (#${env.BUILD_NUMBER})", to: '[email protected]' -// } -// } } } } diff --git a/toolchains-jenkins-ubuntu.xml b/toolchains-jenkins-ubuntu.xml index c94b888..09898d7 100644 --- a/toolchains-jenkins-ubuntu.xml +++ b/toolchains-jenkins-ubuntu.xml @@ -20,16 +20,6 @@ <toolchain> <type>jdk</type> <provides> - <version>1.7</version> - <vendor>sun</vendor> - </provides> - <configuration> - <jdkHome>/home/jenkins/tools/java/latest1.7</jdkHome> - </configuration> - </toolchain> - <toolchain> - <type>jdk</type> - <provides> <version>1.8</version> <vendor>sun</vendor> </provides> @@ -61,11 +51,51 @@ <type>jdk</type> <provides> <version>11</version> - <vendor>oracle</vendor> + <vendor>sun</vendor> </provides> <configuration> <jdkHome>/home/jenkins/tools/java/latest11/</jdkHome> </configuration> </toolchain> + <toolchain> + <type>jdk</type> + <provides> + <version>12</version> + <vendor>sun</vendor> + </provides> + <configuration> + <jdkHome>/home/jenkins/tools/java/latest12/</jdkHome> + </configuration> + </toolchain> + <toolchain> + <type>jdk</type> + <provides> + <version>13</version> + <vendor>sun</vendor> + </provides> + <configuration> + <jdkHome>/home/jenkins/tools/java/latest13/</jdkHome> + </configuration> + </toolchain> + <toolchain> + <type>jdk</type> + <provides> + <version>14</version> + <vendor>sun</vendor> + </provides> + <configuration> + <jdkHome>/home/jenkins/tools/java/latest14/</jdkHome> + </configuration> + </toolchain> + <toolchain> + <type>jdk</type> + <provides> + <version>15</version> + <vendor>sun</vendor> + </provides> + <configuration> + <jdkHome>/home/jenkins/tools/java/latest15/</jdkHome> + </configuration> + </toolchain> <!-- other toolchains --> </toolchains> diff --git a/toolchains-jenkins-win.xml b/toolchains-jenkins-win.xml index 8b5199b..df01b39 100644 --- a/toolchains-jenkins-win.xml +++ b/toolchains-jenkins-win.xml @@ -20,43 +20,82 @@ <toolchain> <type>jdk</type> <provides> - <version>1.7</version> + <version>1.8</version> <vendor>sun</vendor> </provides> <configuration> - <jdkHome>F:\jenkins\tools\java\latest1.7</jdkHome> + <jdkHome>F:\jenkins\tools\java\latest1.8</jdkHome> </configuration> </toolchain> <toolchain> <type>jdk</type> <provides> - <version>1.8</version> + <version>9</version> <vendor>sun</vendor> </provides> <configuration> - <jdkHome>F:\jenkins\tools\java\latest1.8</jdkHome> + <jdkHome>F:\jenkins\tools\java\latest9</jdkHome> </configuration> </toolchain> <toolchain> <type>jdk</type> <provides> - <version>9</version> + <version>10</version> <vendor>sun</vendor> </provides> <configuration> - <jdkHome>F:\jenkins\tools\java\latest9</jdkHome> + <jdkHome>F:\jenkins\tools\java\latest10</jdkHome> </configuration> </toolchain> <toolchain> <type>jdk</type> <provides> <version>11</version> - <vendor>oracle</vendor> + <vendor>sun</vendor> </provides> <configuration> <jdkHome>F:\jenkins\tools\java\latest11</jdkHome> </configuration> </toolchain> - + <toolchain> + <type>jdk</type> + <provides> + <version>12</version> + <vendor>sun</vendor> + </provides> + <configuration> + <jdkHome>F:\jenkins\tools\java\latest12</jdkHome> + </configuration> + </toolchain> + <toolchain> + <type>jdk</type> + <provides> + <version>13</version> + <vendor>sun</vendor> + </provides> + <configuration> + <jdkHome>F:\jenkins\tools\java\latest13</jdkHome> + </configuration> + </toolchain> + <toolchain> + <type>jdk</type> + <provides> + <version>14</version> + <vendor>sun</vendor> + </provides> + <configuration> + <jdkHome>F:\jenkins\tools\java\latest14</jdkHome> + </configuration> + </toolchain> + <!--toolchain> + <type>jdk</type> + <provides> + <version>15</version> + <vendor>sun</vendor> + </provides> + <configuration> + <jdkHome>F:\jenkins\tools\java\latest15</jdkHome> + </configuration> + </toolchain--> <!-- other toolchains --> </toolchains>
