HBASE-20162 [nightly] depending on pipeline execution we sometimes refer to the wrong workspace
Signed-off-by: Mike Drob <md...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/b87165cb Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/b87165cb Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/b87165cb Branch: refs/heads/branch-2 Commit: b87165cbf734f3d6d66c568865570dc16fb5a411 Parents: 32c5118 Author: Sean Busbey <bus...@apache.org> Authored: Thu Mar 8 20:27:21 2018 -0600 Committer: Sean Busbey <bus...@apache.org> Committed: Fri Mar 9 17:23:13 2018 -0600 ---------------------------------------------------------------------- dev-support/Jenkinsfile | 15 ++++++++++----- dev-support/hbase_nightly_yetus.sh | 8 ++++---- 2 files changed, 14 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/b87165cb/dev-support/Jenkinsfile ---------------------------------------------------------------------- diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile index 5453fd5..c91a2b1 100644 --- a/dev-support/Jenkinsfile +++ b/dev-support/Jenkinsfile @@ -30,9 +30,6 @@ pipeline { skipDefaultCheckout() } environment { - TOOLS = "${env.WORKSPACE}/tools" - // 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' @@ -42,6 +39,7 @@ pipeline { PROJECT = 'hbase' PROJECT_PERSONALITY = 'https://raw.githubusercontent.com/apache/hbase/master/dev-support/hbase-personality.sh' + PERSONALITY_FILE = 'tools/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. AUTHOR_IGNORE_LIST = 'src/main/asciidoc/_chapters/developer.adoc,dev-support/test-patch.sh' WHITESPACE_IGNORE_LIST = '.*/generated/.*' @@ -49,7 +47,6 @@ pipeline { ARCHIVE_PATTERN_LIST = 'TEST-*.xml,org.apache.h*.txt,*.dumpstream,*.dump' // These tests currently have known failures. Once they burn down to 0, remove from here so that new problems will cause a failure. TESTS_FILTER = 'cc,checkstyle,javac,javadoc,pylint,shellcheck,whitespace,perlcritic,ruby-lint,rubocop,mvnsite' - BRANCH_SPECIFIC_DOCKERFILE = "${env.BASEDIR}/dev-support/docker/Dockerfile" // Flaky urls for different branches. Replace '-' and '.' in branch name by '_' because those // characters are not allowed in bash variable name. // Not excluding flakies from the nightly build for now. @@ -101,7 +98,8 @@ if [ ! -d "${YETUS_DIR}" ]; then gunzip -c yetus.tar.gz | tar xpf - -C "${YETUS_DIR}" --strip-components 1 fi ''' - dir ("${env.TOOLS}") { + // Set up the file we need at PERSONALITY_FILE location + dir ("tools") { sh """#!/usr/bin/env bash echo "Downloading Project personality." curl -L -o personality.sh "${env.PROJECT_PERSONALITY}" @@ -130,6 +128,7 @@ curl -L -o personality.sh "${env.PROJECT_PERSONALITY}" } } environment { + BASEDIR = "${env.WORKSPACE}/component" // TODO does hadoopcheck need to be jdk specific? // Should be things that work with multijdk TESTS = 'all,-unit,-findbugs' @@ -191,6 +190,7 @@ curl -L -o personality.sh "${env.PROJECT_PERSONALITY}" branch 'branch-1*' } environment { + BASEDIR = "${env.WORKSPACE}/component" TESTS = 'mvninstall,compile,javac,unit,htmlout' OUTPUT_DIR_RELATIVE = "${env.OUTPUT_DIR_RELATIVE_JDK7}" OUTPUT_DIR = "${env.WORKSPACE}/${env.OUTPUT_DIR_RELATIVE_JDK7}" @@ -259,6 +259,7 @@ curl -L -o personality.sh "${env.PROJECT_PERSONALITY}" } } environment { + BASEDIR = "${env.WORKSPACE}/component" TESTS = 'mvninstall,compile,javac,unit,findbugs,htmlout' OUTPUT_DIR_RELATIVE = "${env.OUTPUT_DIR_RELATIVE_HADOOP2}" OUTPUT_DIR = "${env.WORKSPACE}/${env.OUTPUT_DIR_RELATIVE_HADOOP2}" @@ -334,6 +335,7 @@ curl -L -o personality.sh "${env.PROJECT_PERSONALITY}" } } environment { + BASEDIR = "${env.WORKSPACE}/component" TESTS = 'mvninstall,compile,javac,unit,htmlout' OUTPUT_DIR_RELATIVE = "${env.OUTPUT_DIR_RELATIVE_HADOOP3}" OUTPUT_DIR = "${env.WORKSPACE}/${env.OUTPUT_DIR_RELATIVE_HADOOP3}" @@ -408,6 +410,9 @@ curl -L -o personality.sh "${env.PROJECT_PERSONALITY}" // this needs to be set to the jdk that ought to be used to build releases on the branch the Jenkinsfile is stored in. jdk "JDK 1.8 (latest)" } + environment { + BASEDIR = "${env.WORKSPACE}/component" + } steps { sh '''#!/bin/bash -e echo "Setting up directories" http://git-wip-us.apache.org/repos/asf/hbase/blob/b87165cb/dev-support/hbase_nightly_yetus.sh ---------------------------------------------------------------------- diff --git a/dev-support/hbase_nightly_yetus.sh b/dev-support/hbase_nightly_yetus.sh index 27d11c8..4e0200d 100755 --- a/dev-support/hbase_nightly_yetus.sh +++ b/dev-support/hbase_nightly_yetus.sh @@ -18,8 +18,8 @@ declare -i missing_env=0 # Validate params -for required_env in "TESTS" "TOOLS" "BASEDIR" "ARCHIVE_PATTERN_LIST" "OUTPUT_DIR_RELATIVE" \ - "BRANCH_SPECIFIC_DOCKERFILE" "OUTPUT_DIR" "PROJECT" "AUTHOR_IGNORE_LIST" \ +for required_env in "TESTS" "PERSONALITY_FILE" "BASEDIR" "ARCHIVE_PATTERN_LIST" "OUTPUT_DIR_RELATIVE" \ + "OUTPUT_DIR" "PROJECT" "AUTHOR_IGNORE_LIST" \ "WHITESPACE_IGNORE_LIST" "BRANCH_NAME" "TESTS_FILTER" "DEBUG" \ "USE_YETUS_PRERELEASE" "WORKSPACE" "YETUS_RELEASE"; do if [ -z "${!required_env}" ]; then @@ -44,7 +44,7 @@ if [[ -n "${SET_JAVA_HOME}" ]]; then YETUS_ARGS=("--java-home=${SET_JAVA_HOME}" "${YETUS_ARGS[@]}") fi YETUS_ARGS=("--plugins=${TESTS}" "${YETUS_ARGS[@]}") -YETUS_ARGS=("--personality=${TOOLS}/personality.sh" "${YETUS_ARGS[@]}") +YETUS_ARGS=("--personality=${PERSONALITY_FILE}" "${YETUS_ARGS[@]}") YETUS_ARGS=("--basedir=${BASEDIR}" "${YETUS_ARGS[@]}") YETUS_ARGS=("--archive-list=${ARCHIVE_PATTERN_LIST}" "${YETUS_ARGS[@]}") YETUS_ARGS=("--console-urls" "${YETUS_ARGS[@]}") @@ -52,7 +52,7 @@ YETUS_ARGS=("--console-urls" "${YETUS_ARGS[@]}") YETUS_ARGS=("--build-url-patchdir=artifact/${OUTPUT_DIR_RELATIVE}" "${YETUS_ARGS[@]}") YETUS_ARGS=("--build-url-artifacts=artifact/${OUTPUT_DIR_RELATIVE}" "${YETUS_ARGS[@]}") YETUS_ARGS=("--docker" "${YETUS_ARGS[@]}") -YETUS_ARGS=("--dockerfile=${BRANCH_SPECIFIC_DOCKERFILE}" "${YETUS_ARGS[@]}") +YETUS_ARGS=("--dockerfile=${BASEDIR}/dev-support/docker/Dockerfile" "${YETUS_ARGS[@]}") # Yetus sets BUILDMODE env variable to "full" if this arg is passed. YETUS_ARGS=("--empty-patch" "${YETUS_ARGS[@]}") YETUS_ARGS=("--html-report-file=${OUTPUT_DIR}/console-report.html" "${YETUS_ARGS[@]}")