You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ez...@apache.org on 2021/04/12 15:39:41 UTC

[trafficserver-ci] branch main updated: Update toplevel.pipeline

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

eze pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/trafficserver-ci.git


The following commit(s) were added to refs/heads/main by this push:
     new b2b9717  Update toplevel.pipeline
b2b9717 is described below

commit b2b9717bd354eaf89750c2028eaffa861207520f
Author: Evan Zelkowitz <ez...@apache.org>
AuthorDate: Mon Apr 12 09:39:33 2021 -0600

    Update toplevel.pipeline
---
 jenkins/github/toplevel.pipeline | 44 ++++++++++++++++++++++++++++++++--------
 1 file changed, 36 insertions(+), 8 deletions(-)

diff --git a/jenkins/github/toplevel.pipeline b/jenkins/github/toplevel.pipeline
index 7a5983d..33140d0 100644
--- a/jenkins/github/toplevel.pipeline
+++ b/jenkins/github/toplevel.pipeline
@@ -1,15 +1,25 @@
+TOP_JOB_DESC = "Builds:\\n"
+
 String buildJob(String ghcontext, String jobName) {
         setGitHubPullRequestStatus(context: ghcontext, message: 'Building', state: 'PENDING')
+        
+        if (currentBuild.description == null) {
+            currentBuild.description = "Builds:<br>"
+        }
+        currentBuild.displayName = "PR: #${GITHUB_PR_NUMBER} - Build: #${BUILD_NUMBER}"
         def jobBuild = build job: jobName, propagate: false, parameters: [string(name: 'SHA1', value: GITHUB_PR_HEAD_SHA), string(name: 'GITHUB_URL', value: GITHUB_REPO_GIT_URL), string(name: 'GITHUB_PR_NUMBER', value: GITHUB_PR_NUMBER)]
         def jobResult = jobBuild.getResult()
+        def jobURL = jobBuild.getAbsoluteUrl()
+
         echo "Build of '${jobName}' returned result: ${jobResult}"
 
         if (jobResult == 'SUCCESS') {
-            setGitHubPullRequestStatus(context: ghcontext, message: 'Success', state: jobResult)
+            setGitHubPullRequestStatus(context: ghcontext, message: "Success - ${jobURL}", state: jobResult)
         } else {
-            setGitHubPullRequestStatus(context: ghcontext, message: 'Failure', state: jobResult)
+            setGitHubPullRequestStatus(context: ghcontext, message: "Failure - ${jobURL}", state: jobResult, targetUrl: "${jobURL}")
         }
-    return jobResult
+        currentBuild.description += " ${jobName} - ${jobURL} <br>"
+        return jobResult
 }
 
 pipeline {
@@ -44,7 +54,7 @@ pipeline {
                     }
                     steps {
                         script {
-                            result = buildJob('RAT', 'Github_Builds/rat-build')
+                            result = buildJob('RAT', 'Github_Builds/rat')
                             if (result == 'FAILURE') {
                                 error('RAT failed')
                             }
@@ -66,7 +76,7 @@ pipeline {
                     }
                     steps {
                         script {
-                            result = buildJob('Ubuntu-test', 'Github_Builds/ubuntu-build-param')
+                            result = buildJob('Ubuntu', 'Github_Builds/ubuntu')
                             if (result == 'FAILURE') {
                                 error('Ubuntu build failed')
                             }
@@ -82,7 +92,7 @@ pipeline {
                     }                    
                     steps {
                         script {
-                            result = buildJob('Fedora-test', 'Github_Builds/fedora-build-param')
+                            result = buildJob('Fedora', 'Github_Builds/fedora')
                             if (result == 'FAILURE') {
                                 error('Fedora build failed')
                             }
@@ -98,13 +108,15 @@ pipeline {
                     }                    
                     steps {
                         script {
-                            result = buildJob('Debian-test', 'Github_Builds/debian-build-param')
+                            result = buildJob('Debian', 'Github_Builds/debian')
                             if (result == 'FAILURE') {
                                 error('Debian build failed')
                             }
+                            result = 'SUCCESS'
                         }
                     }
                 }
+
                 stage('CentOS Build') {
                     when {
                         anyOf {
@@ -114,7 +126,7 @@ pipeline {
                     }                    
                     steps {
                         script {
-                            result = buildJob('CentOS-test', 'Github_Builds/centos-build-param')
+                            result = buildJob('CentOS', 'Github_Builds/centos')
                             if (result == 'FAILURE') {
                                 error('CentOS build failed')
                             }
@@ -143,6 +155,22 @@ pipeline {
                         }
                     }
                 }
+                stage('AuTest') {
+                    when {
+                        anyOf {
+                            environment name: 'GITHUB_PR_COMMENT_BODY_MATCH', value: ''
+                            expression { GITHUB_PR_COMMENT_BODY_MATCH ==~ /.*autest.*/ }
+                        }
+                    }
+                    steps {
+                        script {
+                            result = buildJob('AuTest', 'Github_Builds/autest')
+                            if (result == 'FAILURE') {
+                                error('AuTest failed')
+                            }
+                        }
+                    }
+                }
             }
         }