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/02/25 07:48:41 UTC
[1/3] hbase git commit: HBASE-15151 ensure findbugs check runs on all
branches. [Forced Update!]
Repository: hbase
Updated Branches:
refs/heads/HBASE-15151 3b3812f23 -> 4d6a00c6b (forced update)
HBASE-15151 ensure findbugs check runs on all branches.
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/4d6a00c6
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/4d6a00c6
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/4d6a00c6
Branch: refs/heads/HBASE-15151
Commit: 4d6a00c6be71350bdf655ad29673807c510abef7
Parents: 18e351d
Author: Sean Busbey <bu...@apache.org>
Authored: Sun Feb 25 00:35:45 2018 -0600
Committer: Sean Busbey <bu...@apache.org>
Committed: Sun Feb 25 01:45:46 2018 -0600
----------------------------------------------------------------------
dev-support/Jenkinsfile | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/4d6a00c6/dev-support/Jenkinsfile
----------------------------------------------------------------------
diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index 7aec507..8efb26f 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -239,7 +239,7 @@ curl -L -o personality.sh "${env.PROJECT_PERSONALITY}"
}
}
environment {
- TESTS = 'mvninstall,compile,javac,unit,htmlout'
+ TESTS = 'mvninstall,compile,javac,unit,findbugs,htmlout'
OUTPUT_DIR_RELATIVE = "${env.OUTPUT_DIR_RELATIVE_HADOOP2}"
OUTPUT_DIR = "${env.WORKSPACE}/${env.OUTPUT_DIR_RELATIVE_HADOOP2}"
// This isn't strictly needed on branches that only support jdk8, but doesn't hurt
@@ -305,10 +305,7 @@ curl -L -o personality.sh "${env.PROJECT_PERSONALITY}"
}
}
environment {
- // Failure in any stage fails the build and consecutive stages are not built.
- // Findbugs is part of this last yetus stage to prevent findbugs precluding hadoop3
- // tests.
- TESTS = 'mvninstall,compile,javac,unit,findbugs,htmlout'
+ TESTS = 'mvninstall,compile,javac,unit,htmlout'
OUTPUT_DIR_RELATIVE = "${env.OUTPUT_DIR_RELATIVE_HADOOP3}"
OUTPUT_DIR = "${env.WORKSPACE}/${env.OUTPUT_DIR_RELATIVE_HADOOP3}"
// This isn't strictly needed on branches that only support jdk8, but doesn't hurt
[2/3] hbase git commit: HBASE-18467 temporarily mute posting to jira
Posted by bu...@apache.org.
HBASE-18467 temporarily mute posting to jira
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/18e351db
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/18e351db
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/18e351db
Branch: refs/heads/HBASE-15151
Commit: 18e351dbea7e7dec8350e3adcdcc7b347782c0b9
Parents: 5f5e3dd
Author: Sean Busbey <bu...@apache.org>
Authored: Sun Feb 25 00:59:52 2018 -0600
Committer: Sean Busbey <bu...@apache.org>
Committed: Sun Feb 25 01:45:46 2018 -0600
----------------------------------------------------------------------
dev-support/Jenkinsfile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/18e351db/dev-support/Jenkinsfile
----------------------------------------------------------------------
diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index 8528b58..7aec507 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -460,7 +460,8 @@ curl -L -o personality.sh "${env.PROJECT_PERSONALITY}"
echo ""
echo "[INFO] There are ${currentBuild.changeSets.size()} change sets."
getJirasToComment(currentBuild).each { currentIssue ->
- jiraComment issueKey: currentIssue, body: comment
+// jiraComment issueKey: currentIssue, body: comment
+ echo "jiraComment issueKey: ${currentIssue}, body: ${comment}"
}
} catch (Exception exception) {
echo "Got exception: ${exception}"
[3/3] hbase git commit: HBASE-18467 report nightly results to devs
via jira
Posted by bu...@apache.org.
HBASE-18467 report nightly results to devs via jira
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/5f5e3dd5
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/5f5e3dd5
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/5f5e3dd5
Branch: refs/heads/HBASE-15151
Commit: 5f5e3dd599e56401e312a283bc3df5ce56d94066
Parents: 549a6d9
Author: Sean Busbey <bu...@apache.org>
Authored: Wed Aug 9 00:48:46 2017 -0500
Committer: Sean Busbey <bu...@apache.org>
Committed: Sun Feb 25 01:45:46 2018 -0600
----------------------------------------------------------------------
dev-support/Jenkinsfile | 165 +++++++++++++++++++++++++++++++++++++++----
1 file changed, 150 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/5f5e3dd5/dev-support/Jenkinsfile
----------------------------------------------------------------------
diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index 201783b..8528b58 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -34,6 +34,12 @@ pipeline {
// where we check out to across stages
BASEDIR = "${env.WORKSPACE}/component"
YETUS_RELEASE = '0.7.0'
+ // where we'll write everything from different steps. Need a copy here so the final step can check for success/failure.
+ OUTPUT_DIR_RELATIVE_GENERAL = 'output-general'
+ OUTPUT_DIR_RELATIVE_JDK7 = 'output-jdk7'
+ OUTPUT_DIR_RELATIVE_HADOOP2 = 'output-jdk8-hadoop2'
+ OUTPUT_DIR_RELATIVE_HADOOP3 = 'output-jdk8-hadoop3'
+
PROJECT = 'hbase'
PROJECT_PERSONALITY = 'https://raw.githubusercontent.com/apache/hbase/master/dev-support/hbase-personality.sh'
// This section of the docs tells folks not to use the javadoc tag. older branches have our old version of the check for said tag.
@@ -119,8 +125,8 @@ curl -L -o personality.sh "${env.PROJECT_PERSONALITY}"
// on branches that don't support jdk7, this will already be JAVA_HOME, so we'll end up not
// doing multijdk there.
MULTIJDK = '/usr/lib/jvm/java-8-openjdk-amd64'
- OUTPUT_DIR_RELATIVE = "output-general"
- OUTPUT_DIR = "${env.WORKSPACE}/${env.OUTPUT_DIR_RELATIVE}"
+ OUTPUT_DIR_RELATIVE = "${env.OUTPUT_DIR_RELATIVE_GENERAL}"
+ OUTPUT_DIR = "${env.WORKSPACE}/${env.OUTPUT_DIR_RELATIVE_GENERAL}"
}
steps {
unstash 'yetus'
@@ -130,7 +136,18 @@ curl -L -o personality.sh "${env.PROJECT_PERSONALITY}"
"${BASEDIR}/dev-support/gather_machine_environment.sh" "${OUTPUT_DIR_RELATIVE}/machine"
'''
// TODO should this be a download from master, similar to how the personality is?
- sh "${env.BASEDIR}/dev-support/hbase_nightly_yetus.sh"
+ sh '''#!/usr/bin/env bash
+ declare commentfile
+ rm -rf "${OUTPUT_DIR}/success}" "${OUTPUT_DIR}/failure"
+ if "${BASEDIR}/dev-support/hbase_nightly_yetus.sh" ; then
+ commentfile="${OUTPUT_DIR}/success"
+ echo '(/) {color:green}+1 general checks{color}' >> "${commentfile}"
+ else
+ commentfile="${OUTPUT_DIR}/failure"
+ echo '(x) {color:red}-1 general checks{color}' >> "${commentfile}"
+ fi
+ echo "-- For more information [see general report|${BUILD_URL}/General_Nightly_Build_Report/]" >> "${commentfile}"
+ '''
}
post {
always {
@@ -155,8 +172,8 @@ curl -L -o personality.sh "${env.PROJECT_PERSONALITY}"
}
environment {
TESTS = 'mvninstall,compile,javac,unit,htmlout'
- OUTPUT_DIR_RELATIVE = "output-jdk7"
- OUTPUT_DIR = "${env.WORKSPACE}/${env.OUTPUT_DIR_RELATIVE}"
+ OUTPUT_DIR_RELATIVE = "${env.OUTPUT_DIR_RELATIVE_JDK7}"
+ OUTPUT_DIR = "${env.WORKSPACE}/${env.OUTPUT_DIR_RELATIVE_JDK7}"
// On branches where we do jdk7 checks, jdk7 will be JAVA_HOME already.
}
steps {
@@ -166,13 +183,22 @@ curl -L -o personality.sh "${env.PROJECT_PERSONALITY}"
rm -rf "${OUTPUT_DIR}/machine" && mkdir "${OUTPUT_DIR}/machine"
"${BASEDIR}/dev-support/gather_machine_environment.sh" "${OUTPUT_DIR_RELATIVE}/machine"
'''
- sh """#!/usr/bin/env bash
+ sh '''#!/usr/bin/env bash
# for branch-1.1 we don't do jdk8 findbugs, so do it here
- if [ "${env.BRANCH_NAME}" == "branch-1.1" ]; then
+ if [ "${BRANCH_NAME}" == "branch-1.1" ]; then
TESTS+=",findbugs"
fi
- "${env.BASEDIR}/dev-support/hbase_nightly_yetus.sh"
- """
+ declare commentfile
+ rm -rf "${OUTPUT_DIR}/success}" "${OUTPUT_DIR}/failure"
+ if "${BASEDIR}/dev-support/hbase_nightly_yetus.sh" ; then
+ commentfile="${OUTPUT_DIR}/success"
+ echo '(/) {color:green}+1 jdk7 checks{color}' >> "${commentfile}"
+ else
+ commentfile="${OUTPUT_DIR}/failure"
+ echo '(x) {color:red}-1 jdk7 checks{color}' >> "${commentfile}"
+ fi
+ echo "-- For more information [see jdk7 report|${BUILD_URL}/JDK7_Nightly_Build_Report/]" >> "${commentfile}"
+ '''
}
post {
always {
@@ -214,8 +240,8 @@ curl -L -o personality.sh "${env.PROJECT_PERSONALITY}"
}
environment {
TESTS = 'mvninstall,compile,javac,unit,htmlout'
- OUTPUT_DIR_RELATIVE = "output-jdk8-hadoop2"
- OUTPUT_DIR = "${env.WORKSPACE}/${env.OUTPUT_DIR_RELATIVE}"
+ OUTPUT_DIR_RELATIVE = "${env.OUTPUT_DIR_RELATIVE_HADOOP2}"
+ OUTPUT_DIR = "${env.WORKSPACE}/${env.OUTPUT_DIR_RELATIVE_HADOOP2}"
// This isn't strictly needed on branches that only support jdk8, but doesn't hurt
// and is needed on branches that do both jdk7 and jdk8
SET_JAVA_HOME = '/usr/lib/jvm/java-8-openjdk-amd64'
@@ -227,7 +253,18 @@ curl -L -o personality.sh "${env.PROJECT_PERSONALITY}"
rm -rf "${OUTPUT_DIR}/machine" && mkdir "${OUTPUT_DIR}/machine"
"${BASEDIR}/dev-support/gather_machine_environment.sh" "${OUTPUT_DIR_RELATIVE}/machine"
'''
- sh "${env.BASEDIR}/dev-support/hbase_nightly_yetus.sh"
+ sh '''#!/usr/bin/env bash
+ declare commentfile
+ rm -rf "${OUTPUT_DIR}/success}" "${OUTPUT_DIR}/failure"
+ if "${BASEDIR}/dev-support/hbase_nightly_yetus.sh" ; then
+ commentfile="${OUTPUT_DIR}/success"
+ echo '(/) {color:green}+1 jdk8 hadoop2 checks{color}' >> "${commentfile}"
+ else
+ commentfile="${OUTPUT_DIR}/failure"
+ echo '(x) {color:red}-1 jdk8 hadoop2 checks{color}' >> "${commentfile}"
+ fi
+ echo "-- For more information [see jdk8 (hadoop2) report|${BUILD_URL}/JDK8_Nightly_Build_Report_(Hadoop2)/]" >> "${commentfile}"
+ '''
}
post {
always {
@@ -272,8 +309,8 @@ curl -L -o personality.sh "${env.PROJECT_PERSONALITY}"
// Findbugs is part of this last yetus stage to prevent findbugs precluding hadoop3
// tests.
TESTS = 'mvninstall,compile,javac,unit,findbugs,htmlout'
- OUTPUT_DIR_RELATIVE = "output-jdk8-hadoop3"
- OUTPUT_DIR = "${env.WORKSPACE}/${env.OUTPUT_DIR_RELATIVE}"
+ OUTPUT_DIR_RELATIVE = "${env.OUTPUT_DIR_RELATIVE_HADOOP3}"
+ OUTPUT_DIR = "${env.WORKSPACE}/${env.OUTPUT_DIR_RELATIVE_HADOOP3}"
// This isn't strictly needed on branches that only support jdk8, but doesn't hurt
// and is needed on branches that do both jdk7 and jdk8
SET_JAVA_HOME = '/usr/lib/jvm/java-8-openjdk-amd64'
@@ -287,7 +324,18 @@ curl -L -o personality.sh "${env.PROJECT_PERSONALITY}"
rm -rf "${OUTPUT_DIR}/machine" && mkdir "${OUTPUT_DIR}/machine"
"${BASEDIR}/dev-support/gather_machine_environment.sh" "${OUTPUT_DIR_RELATIVE}/machine"
'''
- sh "${env.BASEDIR}/dev-support/hbase_nightly_yetus.sh"
+ sh '''#!/usr/bin/env bash
+ declare commentfile
+ rm -rf "${OUTPUT_DIR}/success}" "${OUTPUT_DIR}/failure"
+ if "${BASEDIR}/dev-support/hbase_nightly_yetus.sh" ; then
+ commentfile="${OUTPUT_DIR}/success"
+ echo '(/) {color:green}+1 jdk8 hadoop3 checks{color}' >> "${commentfile}"
+ else
+ commentfile="${OUTPUT_DIR}/failure"
+ echo '(x) {color:red}-1 jdk8 hadoop3 checks{color}' >> "${commentfile}"
+ fi
+ echo "-- For more information [see jdk8 (hadoop3) report|${BUILD_URL}/JDK8_Nightly_Build_Report_(Hadoop3)/]" >> "${commentfile}"
+ '''
}
post {
always {
@@ -337,6 +385,7 @@ curl -L -o personality.sh "${env.PROJECT_PERSONALITY}"
rm -rf "unpacked_src_tarball" && mkdir "unpacked_src_tarball"
rm -rf ".m2-for-repo" && mkdir ".m2-for-repo"
rm -rf ".m2-for-src" && mkdir ".m2-for-src"
+ rm -rf "src_tarball_success" "src_tarball_failure"
'''
sh '''#!/usr/bin/env bash
rm -rf "output-srctarball/machine" && mkdir "output-srctarball/machine"
@@ -356,7 +405,93 @@ curl -L -o personality.sh "${env.PROJECT_PERSONALITY}"
always {
archive 'output-srctarball/*'
}
+ // This approach only works because the source release artifact is the last stage that does work.
+ success {
+ writeFile file: "${env.WORKSPACE}/src_tarball_success", text: '(/) {color:green}+1 source release artifact{color}\n-- See build output for details.'
+ }
+ failure {
+ writeFile file: "${env.WORKSPACE}/src_tarball_failure", text: '(x) {color:red}-1 source release artifact{color}\n-- See build output for details.'
+ }
+ }
+ }
+ stage ('Fail if previous stages failed') {
+ steps {
+ script {
+ def failures = ['src_tarball_failure', "${env.OUTPUT_RELATIVE_GENERAL}/failure",
+ "${env.OUTPUT_RELATIVE_JDK7}/failure", "${OUTPUT_RELATIVE_HADOOP2}/failure",
+ "${env.OUTPUT_RELATIVE_HADOOP3}/failure"]
+ for ( failure_file in failures ) {
+ if (fileExists(file: failure_file)) {
+ error 'Failing job due to failure(s) in prior steps.'
+ }
+ }
+ }
+ }
+ }
+ }
+ post {
+ always {
+ script {
+ try {
+ sh "printenv"
+ def results = ["${env.OUTPUT_RELATIVE_GENERAL}/failure", "${env.OUTPUT_RELATIVE_GENERAL}/success",
+ "${env.OUTPUT_RELATIVE_JDK7}/failure", "${env.OUTPUT_RELATIVE_JDK7}/success",
+ "${env.OUTPUT_RELATIVE_HADOOP2}/failure", "${env.OUTPUT_RELATIVE_HADOOP2}/success",
+ "${env.OUTPUT_RELATIVE_HADOOP3}/failure", "${env.OUTPUT_RELATIVE_HADOOP3}/success",
+ 'src_tarball_failure', 'src_tarball_success']
+ echo env.BRANCH_NAME
+ echo env.BUILD_URL
+ echo currentBuild.result
+ echo currentBuild.durationString
+ def comment = "Results for branch ${env.BRANCH_NAME}, done in ${currentBuild.durationString}\n"
+ comment += "\t[build ${currentBuild.displayName} on builds.a.o|${env.BUILD_URL}]: ${currentBuild.result}\n----\ndetails (if available):\n\n"
+ if (currentBuild.result == "SUCCESS") {
+ comment += "(/) *{color:green}+1 overall{color}*\n\n"
+ } else {
+ comment += "(x) *{color:red}-1 overall{color}*\n"
+ // Ideally get the committer our of the change and @ mention them in the per-jira comment
+ comment += " Committer, please check your recent inclusion of a patch for this issue.\n\n"
+ }
+ echo ""
+ echo "[DEBUG] trying to aggregate step-wise results"
+ comment += results.collect { fileExists(file: it) ? readFile(file: it) : "" }.join("\n\n")
+ echo "[INFO] Comment:"
+ echo comment
+ echo ""
+ echo "[INFO] There are ${currentBuild.changeSets.size()} change sets."
+ getJirasToComment(currentBuild).each { currentIssue ->
+ jiraComment issueKey: currentIssue, body: comment
+ }
+ } catch (Exception exception) {
+ echo "Got exception: ${exception}"
+ echo " ${exception.getStackTrace()}"
+ }
+ }
+ }
+ }
+}
+import org.jenkinsci.plugins.workflow.support.steps.build.RunWrapper
+@NonCPS
+List<String> getJirasToComment(RunWrapper thisBuild) {
+ def seenJiras = []
+ thisBuild.changeSets.each { cs ->
+ cs.getItems().each { change ->
+ CharSequence msg = change.msg
+ echo "change: ${change}"
+ echo " ${msg}"
+ echo " ${change.commitId}"
+ echo " ${change.author}"
+ echo ""
+ msg.eachMatch("HBASE-[0-9]+") { currentIssue ->
+ echo "[DEBUG] found jira key: ${currentIssue}"
+ if (currentIssue in seenJiras) {
+ echo "[DEBUG] already commented on ${currentIssue}."
+ } else {
+ echo "[INFO] commenting on ${currentIssue}."
+ seenJiras << currentIssue
+ }
}
}
}
+ return seenJiras
}