Skip to content

Commit 736d30f

Browse files
committed
Save firstTime this build was attempted in past-jobs.json
just some extra data so we can see what time this started failing without having to calculate based on skips, count, and assuming the job ran every hour
1 parent bc22810 commit 736d30f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Jenkinsfile.trigger

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,10 @@ node {
207207
set -Eeuo pipefail -x
208208

209209
jq <<<"$currentJobsJson" '
210+
# save firstTime if it is not set yet
211+
map_values(.firstTime //= .lastTime)
210212
# merge the two objects recursively, preferring data from "buildCompletionDataJson"
211-
. * ( env.buildCompletionDataJson | fromjson )
213+
| . * ( env.buildCompletionDataJson | fromjson )
212214
' | tee past-jobs.json
213215
'''
214216
archiveArtifacts(

0 commit comments

Comments
 (0)