Upload build duration to splunk

test plan:
Go to splunk, search for events with event name
'jenkins.build.duration'

closes: CCI-360

flag = none

Change-Id: Iba607d434a40f77de92731ea3228cd768404461c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/236220
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Reviewed-by: Rex Fleischer <rfleischer@instructure.com>
QA-Review: Jacob Powell <spowell@instructure.com>
Product-Review: Jacob Powell <spowell@instructure.com>
This commit is contained in:
S. Jacob Powell 2020-05-04 16:54:20 -06:00 committed by Jacob Powell
parent eb5244b32b
commit ebf1fa3b69
1 changed files with 2 additions and 0 deletions

2
Jenkinsfile vendored
View File

@ -442,6 +442,8 @@ pipeline {
rspec.uploadSeleniumFailures()
rspec.uploadRSpecFailures()
load('build/new-jenkins/groovy/reports.groovy').sendFailureMessageIfPresent()
def splunk = load 'build/new-jenkins/groovy/splunk.groovy'
splunk.upload([splunk.event('jenkins.build.duration', ['duration': "$currentBuild.duration"])])
}
}
}