maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tibordig...@apache.org
Subject [maven-surefire] branch parallel updated: printing git authors
Date Fri, 02 Aug 2019 14:15:00 GMT
This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch parallel
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git


The following commit(s) were added to refs/heads/parallel by this push:
     new 6d3be8b  printing git authors
6d3be8b is described below

commit 6d3be8b7c4f5cdcef0591b42b90b03f3bd08fe6d
Author: tibordigana <tibordigana@apache.org>
AuthorDate: Fri Aug 2 16:14:52 2019 +0200

    printing git authors
---
 Jenkinsfile | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 962ea22..40ca31c 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -112,22 +112,10 @@ timeout(time: 12, unit: 'HOURS') {
         currentBuild.result = 'FAILURE'
         throw e
     } finally {
-        println ("got the currentBuild.changeSets ${currentBuild.changeSets}")
         def isFirstBuild = currentBuild == null || currentBuild.changeSets ==  null
-        def authors = isFirstBuild ? [] : currentBuild.changeSets.collectMany { it.toList().collect
{ it.author.toString() }.unique() }
-        println ("got the authors ${authors}")
-        println ("contains userId 'github' ${authors.contains('github')}")
-
-        def author = null
-        if (currentBuild != null && currentBuild.changeSets != null && currentBuild.changeSets.size()
&&
-                currentBuild.changeSets[currentBuild.changeSets.size() - 1].items.length)
{
-            def items = currentBuild.changeSets[currentBuild.changeSets.size() - 1].items
-            author = items[items.length - 1].author.toString()
-        }
-        println("an author of the last commit ${author}")
-        authors = isFirstBuild ? [] : currentBuild.changeSets.last().toList().collect { it.author.toString()
}.unique()
-        println("2 an author of the last commit ${author}")
-        //if (isFirstBuild || !authors.contains('github')) jenkinsNotify()
+        def authors = isFirstBuild ? [] : currentBuild.changeSets.last().toList().collect
{ it.author.toString() }.unique()
+        println("The author of the last change: ${authors}")
+        if (isFirstBuild || !authors.contains('github')) jenkinsNotify()
     }
 }
 


Mime
View raw message