Skip to content

Commit

Permalink
HBASE-22924 GitHUB PR job should use when clause to filter to just PRs (
Browse files Browse the repository at this point in the history
#4915)

Signed-off-by: Duo Zhang <[email protected]>
(cherry picked from commit e1ad781)
  • Loading branch information
shankybnl authored and Apache9 committed Dec 8, 2022
1 parent f320ad9 commit 66ddfb4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
12 changes: 12 additions & 0 deletions dev-support/Jenkinsfile_GitHub
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ pipeline {
YETUS_DRIVER = "${WORKDIR}/${YETUS_DRIVER_REL}"
ASF_NIGHTLIES_GENERAL_CHECK_BASE="${ASF_NIGHTLIES_BASE}/${WORKDIR_REL}/${PATCH_REL}"
}
when {
// this will return true if the pipeline is building a change request, such as a GitHub pull request.
changeRequest()
}
steps {
dir("${SOURCEDIR}") {
checkout scm
Expand Down Expand Up @@ -215,6 +219,10 @@ pipeline {
YETUS_DRIVER = "${WORKDIR}/${YETUS_DRIVER_REL}"
SKIP_ERRORPRONE = true
}
when {
// this will return true if the pipeline is building a change request, such as a GitHub pull request.
changeRequest()
}
steps {
dir("${SOURCEDIR}") {
checkout scm
Expand Down Expand Up @@ -348,6 +356,10 @@ pipeline {
YETUS_DRIVER = "${WORKDIR}/${YETUS_DRIVER_REL}"
SKIP_ERRORPRONE = true
}
when {
// this will return true if the pipeline is building a change request, such as a GitHub pull request.
changeRequest()
}
steps {
dir("${SOURCEDIR}") {
checkout scm
Expand Down
8 changes: 0 additions & 8 deletions dev-support/jenkins_precommit_github_yetus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,6 @@ mkdir -p "${PATCHDIR}"
mkdir "${PATCHDIR}/machine"
"${SOURCEDIR}/dev-support/gather_machine_environment.sh" "${PATCHDIR}/machine"

# If CHANGE_URL is set (e.g., Github Branch Source plugin), process it.
# Otherwise exit, because we don't want HBase to do a
# full build. We wouldn't normally do this check for smaller
# projects. :)
if [[ -z "${CHANGE_URL}" ]]; then
echo "Full build skipped" > "${PATCHDIR}/report.html"
exit 0
fi
# enable debug output for yetus
if [[ "true" = "${DEBUG}" ]]; then
YETUS_ARGS+=("--debug")
Expand Down

0 comments on commit 66ddfb4

Please sign in to comment.