You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by re...@apache.org on 2021/01/25 14:30:17 UTC

[uima-uimafit] 01/01: [UIMA-6307] Centralize Jenkins pipelines

This is an automated email from the ASF dual-hosted git repository.

rec pushed a commit to branch UIMA-6307-Centralize-Jenkins-pipelines
in repository https://gitbox.apache.org/repos/asf/uima-uimafit.git

commit a21965fcbf6dd473adda7d27a3bdc81f9d445eb2
Author: Richard Eckart de Castilho <re...@apache.org>
AuthorDate: Mon Jan 25 15:29:46 2021 +0100

    [UIMA-6307] Centralize Jenkins pipelines
    
    - Use shared library
---
 Jenkinsfile | 80 +++----------------------------------------------------------
 1 file changed, 3 insertions(+), 77 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 6ed222e..f33a3ea 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -15,82 +15,8 @@
 // specific language governing permissions and limitations
 // under the License.
   
-pipeline {
-  agent any
-  
-  tools {
-    maven 'maven_latest' 
-    jdk 'jdk_1.8_latest' 
-  }
-
-  options {
-    buildDiscarder(logRotator(
-      numToKeepStr: '25', 
-      artifactNumToKeepStr: '5'
-    ))
-    
-    // Seems not to be working reliably yet: https://issues.jenkins-ci.org/browse/JENKINS-48556
-    // timestamps()
-  }
-  
-  parameters {
-    string(
-      name: 'extraMavenArguments',
-      defaultValue: "",
-      description: "Extra arguments to be passed to maven (for testing)")
-  }
-
-  stages {
-    // Display information about the build environemnt. This can be useful for debugging
-    // build issues.
-    stage("Build info") {
-      steps {
-        echo '=== Environment variables ==='
-        script {
-          if (isUnix()) {
-            sh 'printenv'
-          }
-          else {
-            bat 'set'
-          }
-        }
-      }
-    }
-        
-    // Perform a merge request build. This is a conditional stage executed with the GitLab
-    // sources plugin triggers a build for a merge request. To avoid conflicts with other
-    // builds, this stage should not deploy artifacts to the Maven repository server and
-    // also not install them locally.
-    stage("Pull request build") {
-      when { branch 'PR-*' }
-    
-      steps {
-        script {
-          currentBuild.description = 'Triggered by: <a href="' + CHANGE_URL + '">' + BRANCH_NAME +
-            ': ' + env.CHANGE_BRANCH + '</a> (' +  env.CHANGE_AUTHOR_DISPLAY_NAME + ')'
-        }
+@Library('uima-build-jenkins-shared-library')
 
-        withMaven() {
-          sh script: 'mvn ' +
-            params.extraMavenArguments +
-            ' -U -Dmaven.test.failure.ignore=true clean verify'
-        }
-      }
-    }
-    
-    // Perform a SNAPSHOT build of a main branch. This stage is typically executed after a
-    // merge request has been merged. On success, it deploys the generated artifacts to the
-    // Maven repository server.
-    stage("SNAPSHOT build") {
-      when { branch pattern: "main|main-v2", comparator: "REGEXP" }
-      
-      steps {
-        withMaven() {
-          sh script: 'mvn ' +
-            params.extraMavenArguments +
-            ' -U -Dmaven.test.failure.ignore=true clean deploy'
-        }
-      }
-    }
-  }
+defaultPipeline {
+  extraMavenArguments = '-Pjacoco,spotbugs,pmd'
 }