You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ol...@apache.org on 2020/04/10 01:42:51 UTC
[tomcat-taglibs-standard] branch master updated: add Jenkinsfile
This is an automated email from the ASF dual-hosted git repository.
olamy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-taglibs-standard.git
The following commit(s) were added to refs/heads/master by this push:
new 9dea49a add Jenkinsfile
9dea49a is described below
commit 9dea49a86f9a1c62ffc0c41132a91dab96d2109f
Author: olivier lamy <ol...@apache.org>
AuthorDate: Fri Apr 10 11:42:35 2020 +1000
add Jenkinsfile
Signed-off-by: olivier lamy <ol...@apache.org>
---
Jenkinsfile | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..dc0a883
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,64 @@
+#!groovy
+
+pipeline {
+ agent any
+ options {
+ durabilityHint('PERFORMANCE_OPTIMIZED')
+ buildDiscarder(logRotator(numToKeepStr: '7', artifactNumToKeepStr: '2'))
+ timeout(time: 60, unit: 'MINUTES')
+ }
+ stages {
+ stage( "Parallel Stage" ) {
+ parallel {
+ stage( "Build / Test - JDK8" ) {
+ agent { node { label 'ubuntu' } }
+ options { timeout( time: 120, unit: 'MINUTES' ) }
+ steps {
+ mavenBuild( "JDK 1.8 (latest)", "clean install" )
+ script {
+ if (env.BRANCH_NAME == 'master') {
+ mavenBuild( "JDK 1.8 (latest)", "deploy" )
+ }
+ }
+ }
+ }
+ stage( "Build / Test - JDK11" ) {
+ agent { node { label 'ubuntu' } }
+ options { timeout( time: 120, unit: 'MINUTES' ) }
+ steps {
+ mavenBuild( "JDK 11 (latest)", "clean install" )
+ }
+ }
+ }
+ }
+ }
+}
+
+
+
+/**
+ * To other developers, if you are using this method above, please use the following syntax.
+ *
+ * mavenBuild("<jdk>", "<profiles> <goals> <plugins> <properties>"
+ *
+ * @param jdk the jdk tool name (in jenkins) to use for this build
+ * @param cmdline the command line in "<profiles> <goals> <properties>"`format.
+ * @return the Jenkinsfile step representing a maven build
+ */
+def mavenBuild(jdk, cmdline) {
+ def mvnName = 'Maven 3.6.3'
+ //def localRepo = "${env.JENKINS_HOME}/${env.EXECUTOR_NUMBER}" // ".repository" //
+ //def settingsName = 'oss-settings.xml'
+ def mavenOpts = '-Xms2g -Xmx2g -Djava.awt.headless=true'
+
+ withMaven(
+ maven: mvnName,
+ jdk: "$jdk",
+ publisherStrategy: 'EXPLICIT',
+ //globalMavenSettingsConfig: settingsName,
+ options: [junitPublisher(disabled: false)],
+ mavenOpts: mavenOpts) {
+ // Some common Maven command line + provided command line
+ sh "mvn -V -B -DfailIfNoTests=false -Dmaven.test.failure.ignore=true $cmdline"
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org