You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2020/04/04 06:37:03 UTC
[logging-log4j2] branch release-2.x updated: Backport Jenkinsfile
from master branch
This is an automated email from the ASF dual-hosted git repository.
mattsicker pushed a commit to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/release-2.x by this push:
new 5d38624 Backport Jenkinsfile from master branch
5d38624 is described below
commit 5d38624c482b35337142df43058d10faccdda92f
Author: Matt Sicker <bo...@gmail.com>
AuthorDate: Sat Apr 4 01:36:37 2020 -0500
Backport Jenkinsfile from master branch
---
Jenkinsfile | 90 +++++++++++++++++++++++++++++++++++++
toolchains-jenkins-ubuntu.xml | 101 ++++++++++++++++++++++++++++++++++++++++++
toolchains-jenkins-win.xml | 101 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 292 insertions(+)
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..96e6d9b
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,90 @@
+#!groovy
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+pipeline {
+ options {
+ ansiColor('xterm')
+ buildDiscarder logRotator(numToKeepStr: '10')
+ timeout time: 2, unit: 'HOURS'
+ parallelsAlwaysFailFast()
+ durabilityHint 'PERFORMANCE_OPTIMIZED'
+ }
+ agent none
+ stages {
+ stage('Build') {
+ parallel {
+ stage('Ubuntu') {
+ agent { label 'ubuntu' }
+ tools {
+ jdk 'JDK 1.8 (latest)'
+ maven 'Maven 3 (latest)'
+ }
+ steps {
+ sh 'mvn -B -fn -t toolchains-jenkins-ubuntu.xml -Djenkins -V clean install'
+ }
+ post {
+ always {
+ archiveArtifacts artifacts: '**/*.jar', fingerprint: true
+ junit '**/*-reports/*.xml'
+ recordIssues enabledForFailure: true,
+ tool: mavenConsole(),
+ referenceJobName: 'log4j/master'
+ recordIssues enabledForFailure: true,
+ tool: errorProne(),
+ referenceJobName: 'log4j/master'
+ recordIssues enabledForFailure: true,
+ tool: java(),
+ sourceCodeEncoding: 'UTF-8',
+ referenceJobName: 'log4j/master'
+ recordIssues enabledForFailure: true,
+ tool: taskScanner(includePattern: '**/*.java', excludePattern: 'target/**', highTags: 'FIXME', normalTags: 'TODO'),
+ sourceCodeEncoding: 'UTF-8',
+ referenceJobName: 'log4j/master'
+ }
+ }
+ }
+ stage('Windows') {
+ agent { label 'Windows' }
+ tools {
+ jdk 'JDK 1.8 (latest)'
+ maven 'Maven 3 (latest)'
+ }
+ steps {
+ bat '''
+ if exist %userprofile%\\.embedmongo\\ rd /s /q %userprofile%\\.embedmongo
+ mvn -B -fn -t toolchains-jenkins-win.xml -Dfile.encoding=UTF-8 -V clean install
+ '''
+ }
+ post {
+ always {
+ junit '**/*-reports/*.xml'
+ }
+ }
+ }
+ }
+ }
+ }
+ post {
+ regression {
+ slackSend channel: 'logging', message: "Regression detected in ${env.BUILD_URL}", color: 'danger'
+ }
+ fixed {
+ slackSend channel: 'logging', message: "Build back to normal: ${env.BUILD_URL}", color: 'good'
+ }
+ }
+}
diff --git a/toolchains-jenkins-ubuntu.xml b/toolchains-jenkins-ubuntu.xml
new file mode 100644
index 0000000..09898d7
--- /dev/null
+++ b/toolchains-jenkins-ubuntu.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache license, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the license for the specific language governing permissions and
+ ~ limitations under the license.
+ -->
+<toolchains>
+ <!-- JDK toolchains -->
+ <toolchain>
+ <type>jdk</type>
+ <provides>
+ <version>1.8</version>
+ <vendor>sun</vendor>
+ </provides>
+ <configuration>
+ <jdkHome>/home/jenkins/tools/java/latest1.8</jdkHome>
+ </configuration>
+ </toolchain>
+ <toolchain>
+ <type>jdk</type>
+ <provides>
+ <version>9</version>
+ <vendor>sun</vendor>
+ </provides>
+ <configuration>
+ <jdkHome>/home/jenkins/tools/java/latest1.9</jdkHome>
+ </configuration>
+ </toolchain>
+ <toolchain>
+ <type>jdk</type>
+ <provides>
+ <version>10</version>
+ <vendor>sun</vendor>
+ </provides>
+ <configuration>
+ <jdkHome>/home/jenkins/tools/java/latest10</jdkHome>
+ </configuration>
+ </toolchain>
+ <toolchain>
+ <type>jdk</type>
+ <provides>
+ <version>11</version>
+ <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
new file mode 100644
index 0000000..df01b39
--- /dev/null
+++ b/toolchains-jenkins-win.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ https://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<toolchains>
+ <!-- JDK toolchains -->
+ <toolchain>
+ <type>jdk</type>
+ <provides>
+ <version>1.8</version>
+ <vendor>sun</vendor>
+ </provides>
+ <configuration>
+ <jdkHome>F:\jenkins\tools\java\latest1.8</jdkHome>
+ </configuration>
+ </toolchain>
+ <toolchain>
+ <type>jdk</type>
+ <provides>
+ <version>9</version>
+ <vendor>sun</vendor>
+ </provides>
+ <configuration>
+ <jdkHome>F:\jenkins\tools\java\latest9</jdkHome>
+ </configuration>
+ </toolchain>
+ <toolchain>
+ <type>jdk</type>
+ <provides>
+ <version>10</version>
+ <vendor>sun</vendor>
+ </provides>
+ <configuration>
+ <jdkHome>F:\jenkins\tools\java\latest10</jdkHome>
+ </configuration>
+ </toolchain>
+ <toolchain>
+ <type>jdk</type>
+ <provides>
+ <version>11</version>
+ <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>