kibana/.ci/Jenkinsfile_coverage

33 lines
1.1 KiB
Plaintext
Raw Normal View History

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