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 84cf36f add autest shard extraction to correct pipeline (#362)
84cf36f is described below
commit 84cf36f0a06bb9d460e8b267fd3a17b75bfcd261
Author: Brian Olsen <[email protected]>
AuthorDate: Wed Nov 20 06:22:36 2024 -0700
add autest shard extraction to correct pipeline (#362)
---
jenkins/github/github_polling.pipeline | 2 --
jenkins/github/toplevel.pipeline | 19 +++++++++++++++----
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/jenkins/github/github_polling.pipeline
b/jenkins/github/github_polling.pipeline
index 6df1358..5d99e65 100644
--- a/jenkins/github/github_polling.pipeline
+++ b/jenkins/github/github_polling.pipeline
@@ -245,8 +245,6 @@ pipeline {
if (env.AUTEST_SHARDS) {
def nshards =
env.AUTEST_SHARDS as int
- println
"Checking autest comment: '${GITHUB_PR_COMMENT_BODY_MATCH}'"
-
// extract
optional shard
mg =
(GITHUB_PR_COMMENT_BODY_MATCH =~ /autest\W*(\d+)/)
if (mg) {
diff --git a/jenkins/github/toplevel.pipeline b/jenkins/github/toplevel.pipeline
index b3d41b5..e8a66b4 100644
--- a/jenkins/github/toplevel.pipeline
+++ b/jenkins/github/toplevel.pipeline
@@ -244,10 +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) }
+
+ // extract
optional shard
+ mg =
(GITHUB_PR_COMMENT_BODY_MATCH =~ /autest\W*(\d+)/)
+ if (mg) {
+ def
index = mg.group(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 {