You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bu...@apache.org on 2018/08/10 17:06:31 UTC
hbase git commit: HBASE-20387 create flaky test report as a part of
nightly jobs. [Forced Update!]
Repository: hbase
Updated Branches:
refs/heads/HBASE-20387 7cd266e9f -> fa6ea99da (forced update)
HBASE-20387 create flaky test report as a part of nightly jobs.
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/fa6ea99d
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/fa6ea99d
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/fa6ea99d
Branch: refs/heads/HBASE-20387
Commit: fa6ea99dac2c02aad77998df5ab505ee050218b2
Parents: 9aa1cd7
Author: Sean Busbey <bu...@apache.org>
Authored: Fri Aug 10 11:28:10 2018 -0500
Committer: Sean Busbey <bu...@apache.org>
Committed: Fri Aug 10 12:06:08 2018 -0500
----------------------------------------------------------------------
dev-support/Jenkinsfile | 34 +++++++++++++++
dev-support/run-flaky-tests.Jenkinsfile | 64 ++++++++++++++++++++++++++++
2 files changed, 98 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/fa6ea99d/dev-support/Jenkinsfile
----------------------------------------------------------------------
diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index 59d3227..45ff568 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -165,6 +165,40 @@ pipeline {
}
}
}
+ stage ('project branch reporting') {
+ parallel {
+ stage ('build flaky report') {
+ steps {
+ // since we don't define a new node for running, we'll reuse the scm checkout
+ sh '''#!/usr/bin/env bash
+ set -e
+ rm -rf output-flaky-report && mkdir output-flaky-report
+ declare -a flaky_args
+ flaky_args=("${flaky_args[@]}" --urls "${JOB_URL}" --is-yetus True --max-builds 5)
+ # TODO Once we have a branch-specific "run the flaky tests" job add it here
+ # flaky_args=("${flaky_args[@]}" --urls "${JENKINS_URL}/job/HBase-Flaky-Tests/job/${BRANCH_NAME}" --max-builds 40)
+ docker build -t hbase-dev-support dev-support
+ docker run -v component:/hbase -v output-flaky-report:/ouput-flaky-report --workdir=/ouput-flaky-report hbase-dev-support python /hbase/dev-support/report-flakies.py --mvn -v "${flaky_args[@]}"
+'''
+ }
+ post {
+ always {
+ // Has to be relative to WORKSPACE.
+ archive "output-flaky-report/*"
+ publishHTML target: [
+ allowMissing: true,
+ keepAll: true,
+ alwaysLinkToLastBuild: true,
+ // Has to be relative to WORKSPACE
+ reportDir: "output-flaky-report",
+ reportFiles: 'dashboard.html',
+ reportName: 'Flaky Test Report'
+ ]
+ }
+ }
+ }
+ }
+ }
stage ('init health results') {
steps {
// stash with given name for all tests we might run, so that we can unstash all of them even if
http://git-wip-us.apache.org/repos/asf/hbase/blob/fa6ea99d/dev-support/run-flaky-tests.Jenkinsfile
----------------------------------------------------------------------
diff --git a/dev-support/run-flaky-tests.Jenkinsfile b/dev-support/run-flaky-tests.Jenkinsfile
new file mode 100644
index 0000000..7bb825e
--- /dev/null
+++ b/dev-support/run-flaky-tests.Jenkinsfile
@@ -0,0 +1,64 @@
+// 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.
+pipeline {
+ agent {
+ node {
+ label 'Hadoop'
+ }
+ }
+ triggers {
+ cron('@hourly')
+ }
+ options {
+ // this should roughly match how long we tell the flaky dashboard to look at
+ buildDiscarder(logRotator(numToKeepStr: '80'))
+ timeout (time: 2, unit: 'HOURS')
+ timestamps()
+ }
+ parameters {
+ booleanParam(name: 'DEBUG', defaultValue: false, description: 'Produce a lot more meta-information.')
+ }
+ tools {
+ // this should match what the yetus nightly job for the branch will use
+ maven 'Maven (latest)'
+ jdk "JDK 1.8 (latest)"
+ }
+ stages {
+ stage ('run flaky tests') {
+ steps {
+ sh '''#!/usr/bin/env bash
+ set -e
+ ulimit -a
+ rm -rf local-repository/org/apache/hbase
+ if [ "${DEBUG}" = "true" ]; then
+ curl_debug="-v"
+ mvn_debug="-X"
+ fi
+ curl --fail "${curl_debug}" -o includes.txt "${JENKINS_URL}/job/HBase%20Nightly/job/${BRANCH_NAME}/lastSuccessfulBuild/artifact/output-flaky-report/includes"
+ mvn clean package "${mvn_debug}" -fn -Dbuild.id="${BUILD_ID}" -Dtest="$(cat includes.txt)" -Dmaven.test.redirectTestOutputToFile=true -Dmaven.repo.local="${WORKSPACE}/local-repository" -Dsurefire.firstPartForkCount=3 -Dsurefire.secondPartForkCount=3
+'''
+ }
+ }
+ }
+ post {
+ always {
+ junit testResults: "**/surefire-reports/*.xml", allowEmptyResults: true
+ // TODO compress these logs
+ archive '**/surefire-reports/*,**/test-data/*'
+ }
+ }
+}