Skip to content

Commit e1ad781

Browse files
authored
HBASE-22924 GitHUB PR job should use when clause to filter to just PRs (#4915)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
1 parent febe511 commit e1ad781

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

dev-support/Jenkinsfile_GitHub

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ pipeline {
9292
YETUS_DRIVER = "${WORKDIR}/${YETUS_DRIVER_REL}"
9393
ASF_NIGHTLIES_GENERAL_CHECK_BASE="${ASF_NIGHTLIES_BASE}/${WORKDIR_REL}/${PATCH_REL}"
9494
}
95+
when {
96+
// this will return true if the pipeline is building a change request, such as a GitHub pull request.
97+
changeRequest()
98+
}
9599
steps {
96100
dir("${SOURCEDIR}") {
97101
checkout scm
@@ -215,6 +219,10 @@ pipeline {
215219
YETUS_DRIVER = "${WORKDIR}/${YETUS_DRIVER_REL}"
216220
SKIP_ERRORPRONE = true
217221
}
222+
when {
223+
// this will return true if the pipeline is building a change request, such as a GitHub pull request.
224+
changeRequest()
225+
}
218226
steps {
219227
dir("${SOURCEDIR}") {
220228
checkout scm
@@ -347,6 +355,10 @@ pipeline {
347355
YETUS_DRIVER = "${WORKDIR}/${YETUS_DRIVER_REL}"
348356
SKIP_ERRORPRONE = true
349357
}
358+
when {
359+
// this will return true if the pipeline is building a change request, such as a GitHub pull request.
360+
changeRequest()
361+
}
350362
steps {
351363
dir("${SOURCEDIR}") {
352364
checkout scm

dev-support/jenkins_precommit_github_yetus.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,6 @@ mkdir -p "${PATCHDIR}"
6767
mkdir "${PATCHDIR}/machine"
6868
"${SOURCEDIR}/dev-support/gather_machine_environment.sh" "${PATCHDIR}/machine"
6969

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

0 commit comments

Comments
 (0)