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

bnolsen 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 e7071bb  add the ability to only run single autest shards (#357)
e7071bb is described below

commit e7071bb6528817c594895e497e91ca536fb8cf34
Author: Brian Olsen <[email protected]>
AuthorDate: Tue Nov 19 13:50:24 2024 -0700

    add the ability to only run single autest shards (#357)
    
    * add the ability to only run single autest shards
    
    * check for negative shard
---
 jenkins/github/github_polling.pipeline | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/jenkins/github/github_polling.pipeline 
b/jenkins/github/github_polling.pipeline
index 23733da..bef11f6 100644
--- a/jenkins/github/github_polling.pipeline
+++ b/jenkins/github/github_polling.pipeline
@@ -244,11 +244,21 @@ pipeline {
                                                        String jobpath = 
'Github_Builds/autest'
                                                        if (env.AUTEST_SHARDS) {
                                                                def nshards = 
env.AUTEST_SHARDS as int
-                                                               def jobs = [:]
-                                                               for (index = 0 
; index < nshards ; index++) {
-                                                                       String 
shard = index + "of" + env.AUTEST_SHARDS
-                                                                       
jobs[shard] = { buildJob('AuTest ' + shard, jobpath, shard) }
-                                                               }
+
+                                                               args_arr = 
GITHUB_PR_COMMENT_BODY_MATCH.split(" ").collect{ it.trim() }
+                                                               if (1 < 
args_arr.length) {
+                                                                       def 
index = args_arr[1] as int
+                                                                       if (0 
<= index && index < nshards) {
+                                                                               
String shard = index + "of" + env.AUTEST_SHARDS
+                                                                               
result = buildJob('AuTest ' + shard, jobpath, shard)
+                                                                       }
+                                                               } else {
+                                                                       def 
jobs = [:]
+                                                                       for 
(index = 0 ; index < nshards ; index++) {
+                                                                               
String shard = index + "of" + env.AUTEST_SHARDS
+                                                                               
jobs[shard] = { buildJob('AuTest ' + shard, jobpath, shard) }
+                                                                               
}
+                                                                       }
                                                                parallel jobs
                                                        } else {
                                                                result = 
buildJob('AuTest', jobpath)

Reply via email to