Skip to content

Commit af71643

Browse files
authored
Merge pull request #137 from infosiftr/queue
Print queue position during triggering
2 parents cbfb464 + 1cddc5d commit af71643

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Jenkinsfile.trigger

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ def waitQueueClosure(identifier, buildId, externalizableId) {
128128

129129
// stage to wrap up all the build job triggers that get waited on later
130130
stage('trigger') {
131+
def queueLength = queue.size()
132+
def i = 0 // count of where in the triggering we are at
131133
for (buildObj in queue) {
134+
i += 1 // 1 of N ... N of N
132135
if (buildObj.gha_payload) {
133136
stage(buildObj.identifier) {
134137
// "catchError" to set "stageResult" :(
@@ -169,6 +172,8 @@ stage('trigger') {
169172
// "catchError" to set "stageResult" :(
170173
catchError(message: 'Build of "' + buildObj.identifier + '" failed', buildResult: 'UNSTABLE', stageResult: 'FAILURE') {
171174

175+
// print image name and position to help with large queues
176+
echo("Triggering build $i of $queueLength: '$buildObj.identifier'")
172177
// why not parallel these build() invocations?
173178
// jenkins parallel closures get started in a randomish order, ruining our sorted queue
174179
def res = build(

0 commit comments

Comments
 (0)