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/07/19 21:31:34 UTC
[logging-pipelines] branch master updated: Split build/test/deploy
stages
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-pipelines.git
The following commit(s) were added to refs/heads/master by this push:
new c32499d Split build/test/deploy stages
c32499d is described below
commit c32499d7e918d5a012ec7b051f419985007d98e6
Author: Matt Sicker <bo...@gmail.com>
AuthorDate: Sun Jul 19 16:31:14 2020 -0500
Split build/test/deploy stages
---
log4j/Jenkinsfile | 60 +++++++++++++++++++++++--------------------------------
1 file changed, 25 insertions(+), 35 deletions(-)
diff --git a/log4j/Jenkinsfile b/log4j/Jenkinsfile
index 02462b7..58e4f2b 100644
--- a/log4j/Jenkinsfile
+++ b/log4j/Jenkinsfile
@@ -39,12 +39,22 @@ pipeline {
}
// https://jenkins.io/doc/book/pipeline/syntax/#agent
- // start with no Jenkins agent allocated as they will only be needed for the individual stages
- // therefore, anything in the top level post section can only contain steps that don't require a Jenkins agent
- // (such as slackSend, mail, etc.)
- agent none
+ agent {
+ // https://cwiki.apache.org/confluence/display/INFRA/Jenkins+node+labels
+ label 'ubuntu'
+ }
+ // https://jenkins.io/doc/book/pipeline/syntax/#tools
+ 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)'
+ }
+ environment {
+ LANG = 'C.UTF-8'
+ }
stages {
- stage('Ensure Latest') {
+ stage('Build') {
steps {
// https://issues.jenkins-ci.org/browse/JENKINS-43353
script {
@@ -52,33 +62,17 @@ pipeline {
if (buildNumber > 1) milestone(buildNumber - 1)
milestone(buildNumber)
}
+ // note that the jenkins system property is set here to activate certain pom properties in
+ // some log4j modules that compile against system jars (e.g., log4j-jmx-gui)
+ sh 'mvn --show-version --toolchains toolchains-jenkins-ubuntu.xml -Djenkins clean install -DskipTests'
}
}
- stage('Continuous Integration') {
+ stage('Test') {
// https://jenkins.io/doc/book/pipeline/syntax/#parallel
parallel {
stage('Ubuntu') {
- agent {
- // https://cwiki.apache.org/confluence/display/INFRA/Jenkins+node+labels
- label 'ubuntu'
- }
- // https://jenkins.io/doc/book/pipeline/syntax/#tools
- 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)'
- }
- // https://jenkins.io/doc/book/pipeline/syntax/#environment
- environment {
- LANG = 'C.UTF-8'
- }
steps {
- // build, test, and deploy snapshots
- // note that the jenkins system property is set here to activate certain pom properties in
- // some log4j modules that compile against system jars (e.g., log4j-jmx-gui)
- // also note that the Jenkins agents on builds.a.o already have an ~/.m2/settings.xml for snapshots
- sh 'mvn --show-version --fail-at-end --toolchains toolchains-jenkins-ubuntu.xml -Djenkins clean install deploy'
+ sh 'mvn --fail-at-end --toolchains toolchains-jenkins-ubuntu.xml -Djenkins verify'
}
post {
always {
@@ -100,15 +94,6 @@ pipeline {
// https://cwiki.apache.org/confluence/display/INFRA/Jenkins+node+labels
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)'
- }
- environment {
- LANG = 'C.UTF-8'
- }
steps {
// note that previous test runs of log4j-mongodb* may have left behind an embedded mongo folder
// also note that we don't need to use the jenkins system property here as it's ubuntu-specific
@@ -126,6 +111,11 @@ pipeline {
}
}
}
+ stage('Deploy') {
+ steps {
+ sh 'mvn --toolchains toolchains-jenkins-ubuntu.xml -Djenkins deploy'
+ }
+ }
}
post {
fixed {