hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject hbase git commit: HBASE-18147 POC jenkinsfile for nightly checks. [Forced Update!]
Date Wed, 05 Jul 2017 14:08:04 GMT
Repository: hbase
Updated Branches:
  refs/heads/HBASE-18147 ebac215e1 -> 6183dda9b (forced update)


HBASE-18147 POC jenkinsfile for nightly checks.


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/6183dda9
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/6183dda9
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/6183dda9

Branch: refs/heads/HBASE-18147
Commit: 6183dda9b3502fd04990187b953c3357e503d03e
Parents: 8b63eb6
Author: Sean Busbey <sean.busbey@gmail.com>
Authored: Tue Jul 4 15:12:38 2017 -0400
Committer: Sean Busbey <sean.busbey@gmail.com>
Committed: Wed Jul 5 10:07:29 2017 -0400

----------------------------------------------------------------------
 dev-support/Jenkinsfile | 108 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 108 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/6183dda9/dev-support/Jenkinsfile
----------------------------------------------------------------------
diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
new file mode 100644
index 0000000..2df04b5
--- /dev/null
+++ b/dev-support/Jenkinsfile
@@ -0,0 +1,108 @@
+pipeline {
+  agent {
+    node {
+      label 'Hadoop'
+    }
+  }
+  triggers {
+    cron('@daily')
+  }
+  options {
+    timeout (time: 6, unit: 'HOURS')
+    timestamps()
+  }
+  environment {
+    YETUS_RELEASE = '0.4.0'
+    YETUSDIR = "${env.WORKSPACE}/yetus-${env.YETUS_RELEASE}"
+    TOOLS = "${env.WORKSPACE}/tools"
+    BASEDIR = "${env.WORKSPACE}/component"
+    OUTPUTDIR = "${env.WORKSPACE}/artifacts"
+    PROJECT = 'hbase'
+    PROJET_PERSONALITY = 'https://raw.githubusercontent.com/apache/hbase/master/dev-support/hbase-personality.sh'
+    AUTHOR_IGNORE_LIST = 'src/main/asciidoc/_chapters/developer.adoc'
+    WHITESPACE_IGNORE_LIST = '.*/generated/.*'
+    TESTS_FILTER = 'cc,checkstyle,javac,javadoc,pylint,shellcheck,whitespace,perlcritic,ruby-lint,rubocop'
+    BRANCH_SPECIFIC_DOCKERFILE = "${env.BASEDIR}/dev-support/docker/Dockerfile"
+  }
+  parameters {
+    booleanParam(name: 'USE_YETUS_PRERELEASE', defaultValue: false, description: '''Check
to use the current HEAD of apache/yetus rather than our configured release.
+
+    Should only be used manually when e.g. there is some non-work-aroundable issue in yetus
we are checking a fix for.''')
+  }
+  stages {
+    stage ('yetus check') {
+      steps {
+        sh  '''#!/usr/bin/env bash
+echo "Ensure we have a copy of Apache Yetus."
+if [[ true !=  "${USE_YETUS_PRERELEASE}" ]]; then
+  if [ -d "${YETUSDIR}" ]; then
+    echo "New download of Apache Yetus version ${YETUS_RELEASE}."
+    rm -rf "${WORKSPACE}/.gpg"
+    mkdir -p "${WORKSPACE}/.gpg"
+    chmod -R 700 "${WORKSPACE}/.gpg"
+
+    echo "install yetus project KEYS"
+    curl -L --fail -o "${WORKSPACE}/KEYS_YETUS" https://dist.apache.org/repos/dist/release/yetus/KEYS
+    gpg --homedir "${WORKSPACE}/.gpg" --import "${WORKSPACE}/KEYS_YETUS"
+
+    echo "download yetus release ${YETUS_RELEASE}"
+    curl -L --fail -O "https://dist.apache.org/repos/dist/release/yetus/${YETUS_RELEASE}/yetus-${YETUS_RELEASE}-bin.tar.gz"
+    curl -L --fail -O "https://dist.apache.org/repos/dist/release/yetus/${YETUS_RELEASE}/yetus-${YETUS_RELEASE}-bin.tar.gz.asc"
+    echo "verifying yetus release"
+    gpg --homedir "${WORKSPACE}/.gpg" --verify "yetus-${YETUS_RELEASE}-bin.tar.gz.asc"
+    mv "yetus-${YETUS_RELEASE}-bin.tar.gz" yetus.tar.gz
+  else
+    echo "Reusing cached download of Apache Yetus version ${YETUS_RELEASE}."
+  fi
+else
+  YETUSDIR="${WORKSPACE}/yetus-git"
+  rm -rf "${YETUSDIR}"
+  echo "downloading from github"
+  curl -L --fail https://api.github.com/repos/apache/yetus/tarball/HEAD -o yetus.tar.gz
+fi
+echo "unpacking yetus"
+mkdir -p "${YETUSDIR}"
+gunzip -c yetus.tar.gz | tar xpf - -C "${YETUSDIR}" --strip-components 1
+	'''
+	sh """
+echo "Downloading Project personality."
+curl -L  -o "${env.TOOLS}/personality.sh" "${env.PROJET_PERSONALITY}"
+	"""
+	sh '''
+YETUS_ARGS=()
+YETUS_ARGS=("--personality=${TOOLS}/personality.sh" "${YETUS_ARGS[@]}")
+YETUS_ARGS=("--basedir=${BASEDIR}" "${YETUS_ARGS[@]}")
+YETUS_ARGS=("--build-url-artifacts=${OUTPUTDIR}" "${YETUS_ARGS[@]}")
+YETUS_ARGS=("--console-urls" "${YETUS_ARGS[@]}")
+YETUS_ARGS=("--docker" "${YETUS_ARGS[@]}")
+YETUS_ARGS=("--dockerfile=${BRANCH_SPECIFIC_DOCKERFILE}" "${YETUS_ARGS[@]}")
+YETUS_ARGS=("--empty-patch" "${YETUS_ARGS[@]}")
+YETUS_ARGS=("--html-report-file=${OUTPUTDIR}/console-report.html" "${YETUS_ARGS[@]}")
+YETUS_ARGS=("--jenkins" "${YETUS_ARGS[@]}")
+YETUS_ARGS=("--mvn-custom-repos" "${YETUS_ARGS[@]}")
+YETUS_ARGS=("--patch-dir=${OUTPUTDIR}" "${YETUS_ARGS[@]}")
+YETUS_ARGS=("--project=${PROJECT}" "${YETUS_ARGS[@]}")
+YETUS_ARGS=("--resetrepo" "${YETUS_ARGS[@]}")
+YETUS_ARGS=("--author-ignore-list=${AUTHOR_IGNORE_LIST}" "${YETUS_ARGS[@]}")
+YETUS_ARGS=("--whitespace-eol-ignore-list=${WHITESPACE_IGNORE_LIST}" "${YETUS_ARGS[@]}")
+YETUS_ARGS=("--whitespace-tabs-ignore-list=${WHITESPACE_IGNORE_LIST}" "${YETUS_ARGS[@]}")
+YETUS_ARGS=("--sentinel" "${YETUS_ARGS[@]}")
+YETUS_ARGS=("--tests-filter=${TESTS_FILTER}" "${YETUS_ARGS[@]}")
+
+rm -rf "${OUTPUTDIR}"
+mkdir -p "${OUTPUTDIR}"
+if [[ true !=  "${USE_YETUS_PRERELEASE}" ]]; then
+  TESTPATCHBIN=${YETUSDIR}/bin/test-patch
+else
+  TESTPATCHBIN=${YETUSDIR}/precommit/test-patch.sh
+fi
+echo "Launching yetus with command line:"
+echo "${TESTPATCHBIN ${YETUS_ARGS[@]}"
+
+/usr/bin/env bash "${TESTPATCHBIN}" "${YETUS_ARGS[@]}"
+	'''
+      }
+    }
+  }
+}
+


Mime
View raw message