2020-01-08 21:08:48 +01:00
|
|
|
#!/bin/groovy
|
|
|
|
|
|
|
|
library 'kibana-pipeline-library'
|
|
|
|
kibanaLibrary.load() // load from the Jenkins instance
|
|
|
|
|
2020-04-29 19:00:14 +02:00
|
|
|
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
|
|
|
]) {
|
2020-04-04 16:11:31 +02: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-01-08 21:08:48 +01:00
|
|
|
}
|
|
|
|
}
|
2020-05-13 23:09:42 +02:00
|
|
|
kibanaPipeline.sendMail()
|
2020-01-08 21:08:48 +01:00
|
|
|
}
|
|
|
|
}
|
2020-05-13 23:09:42 +02:00
|
|
|
|
|
|
|
def handleIngestion(timestamp) {
|
|
|
|
kibanaPipeline.downloadCoverageArtifacts()
|
|
|
|
kibanaCoverage.prokLinks("### Process HTML Links")
|
|
|
|
kibanaCoverage.collectVcsInfo("### Collect VCS Info")
|
2020-06-03 22:21:28 +02:00
|
|
|
kibanaCoverage.generateReports("### Merge coverage reports")
|
|
|
|
kibanaCoverage.uploadCombinedReports()
|
2020-05-13 23:09:42 +02:00
|
|
|
kibanaCoverage.ingest(timestamp, '### Injest && Upload')
|
|
|
|
kibanaCoverage.uploadCoverageStaticSite(timestamp)
|
|
|
|
}
|
|
|
|
|
|
|
|
|