kibana/.ci/Jenkinsfile_coverage
2020-05-13 15:09:42 -06:00

31 lines
991 B
Groovy

#!/bin/groovy
library 'kibana-pipeline-library'
kibanaLibrary.load() // load from the Jenkins instance
kibanaPipeline(timeoutMinutes: 240) {
catchErrors {
def timestamp = new Date(currentBuild.startTimeInMillis).format("yyyy-MM-dd'T'HH:mm:ss'Z'", TimeZone.getTimeZone("UTC"))
withEnv([
"TIME_STAMP=${timestamp}",
'CODE_COVERAGE=1', // Enables coverage. Needed for multiple ci scripts, such as remote.ts, test/scripts/*.sh, schema.js, etc.
]) {
workers.base(name: 'coverage-worker', size: 'l', ramDisk: false, bootstrapped: false) {
kibanaCoverage.runTests()
handleIngestion(TIME_STAMP)
}
}
kibanaPipeline.sendMail()
}
}
def handleIngestion(timestamp) {
kibanaPipeline.downloadCoverageArtifacts()
kibanaCoverage.prokLinks("### Process HTML Links")
kibanaCoverage.collectVcsInfo("### Collect VCS Info")
kibanaCoverage.ingest(timestamp, '### Injest && Upload')
kibanaCoverage.uploadCoverageStaticSite(timestamp)
}