HBASE-22719 Add debug support for github PR pre commit job

This commit is contained in:
Duo Zhang 2019-07-22 08:37:45 +08:00
parent 6fb03e63b6
commit c54085a8d9
1 changed files with 11 additions and 10 deletions

View File

@ -35,13 +35,13 @@ pipeline {
DOCKERFILE = "${SOURCEDIR}/dev-support/docker/Dockerfile" DOCKERFILE = "${SOURCEDIR}/dev-support/docker/Dockerfile"
YETUS='yetus' YETUS='yetus'
// Branch or tag name. Yetus release tags are 'rel/X.Y.Z' // Branch or tag name. Yetus release tags are 'rel/X.Y.Z'
YETUS_VERSION='rel/0.9.0' YETUS_VERSION='rel/0.10.0'
} }
parameters { parameters {
string(name: 'JIRA_ISSUE_KEY', booleanParam(name: 'DEBUG',
defaultValue: '', defaultValue: false,
description: 'The JIRA issue that has a patch needing pre-commit testing. Example: HBASE-1234') description: 'Print extra outputs for debugging the jenkins job and yetus')
} }
stages { stages {
@ -96,17 +96,18 @@ pipeline {
ulimit -a >"${PATCHDIR}/machine/ulimit-a" 2>&1 || true ulimit -a >"${PATCHDIR}/machine/ulimit-a" 2>&1 || true
## /H* ## /H*
# if given a JIRA issue, process it. If CHANGE_URL is set # If CHANGE_URL is set (e.g., Github Branch Source plugin), process it.
# (e.g., Github Branch Source plugin), process it. # Otherwise exit, because we don't want HBase to do a
# otherwise exit, because we don't want HBase to do a
# full build. We wouldn't normally do this check for smaller # full build. We wouldn't normally do this check for smaller
# projects. :) # projects. :)
if [[ -n "${JIRA_ISSUE_KEY}" ]]; then if [[ -z "${CHANGE_URL}" ]]; then
YETUS_ARGS+=("${JIRA_ISSUE_KEY}")
elif [[ -z "${CHANGE_URL}" ]]; then
echo "Full build skipped" > "${WORKSPACE}/${PATCHDIR}/report.html" echo "Full build skipped" > "${WORKSPACE}/${PATCHDIR}/report.html"
exit 0 exit 0
fi fi
# enable debug output for yetus
if [[ "true" = "${DEBUG}" ]]; then
YETUS_ARGS+=("--debug")
fi
YETUS_ARGS+=("--patch-dir=${WORKSPACE}/${PATCHDIR}") YETUS_ARGS+=("--patch-dir=${WORKSPACE}/${PATCHDIR}")
# where the source is located # where the source is located
YETUS_ARGS+=("--basedir=${WORKSPACE}/${SOURCEDIR}") YETUS_ARGS+=("--basedir=${WORKSPACE}/${SOURCEDIR}")