blob: 65bd008efa6bc2c41cc8c39ac6d415c9a9bb1490 [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
timestamps {
try {
timeout(time: 3, unit: 'HOURS') { // includes waiting for a machine
node('Hetzner') {
dir('flink-benchmarks') {
git url: 'https://github.com/apache/flink-benchmarks.git', branch: 'master'
sh './regression_report_v2.py > regression-report'
def alerts = readFile "regression-report"
if (alerts) {
def attachments = [
[
text: "Performance regression\n$alerts",
fallback: "Performance regression",
]
]
slackSend (attachments: attachments, channel: "#flink-dev-benchmarks")
}
}
}
}
}
catch (org.jenkinsci.plugins.workflow.steps.FlowInterruptedException err) {
slackSend (
channel: "#flink-dev-benchmarks",
message: "Build interrupted ${env.BUILD_NUMBER} of ${env.JOB_NAME} (<${env.BUILD_URL}|Open>): $err"
)
}
catch (err) {
slackSend (message: "Failed build ${env.BUILD_NUMBER} of ${env.JOB_NAME} (<${env.BUILD_URL}|Open>): $err", channel: "#flink-dev-benchmarks")
throw err
}
}