You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2026/03/06 22:06:53 UTC
(kudu) branch master updated: [build] Allow CLEAN_THIRDPARTY label in commit messages.
This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new ab4da27ef [build] Allow CLEAN_THIRDPARTY label in commit messages.
ab4da27ef is described below
commit ab4da27ef20e57b92e87861afb9cacb765e4df6f
Author: Zoltan Martonka <zm...@gmail.com>
AuthorDate: Wed Mar 4 08:55:03 2026 +0000
[build] Allow CLEAN_THIRDPARTY label in commit messages.
Allow a label in commit messages signaling that a clean build of
thirdparty is needed, since the commit is incompatible with
the current master version.
This will spare us from manually running workspace cleanup every time a
new revision of the commit is built.
Also, the DONT_BUILD label should not depend on git show tabulating the
commit message with exactly 4 spaces, and it should not scan the diff,
only the commit message.
Change-Id: Id0b3187f763df171cb2786ddfd495811ece31693
Reviewed-on: http://gerrit.cloudera.org:8080/24067
Tested-by: Alexey Serbin <al...@apache.org>
Reviewed-by: Alexey Serbin <al...@apache.org>
---
build-support/jenkins/build-and-test.sh | 31 ++++++++++++++++++++++---------
1 file changed, 22 insertions(+), 9 deletions(-)
diff --git a/build-support/jenkins/build-and-test.sh b/build-support/jenkins/build-and-test.sh
index 975993e98..22965bfde 100755
--- a/build-support/jenkins/build-and-test.sh
+++ b/build-support/jenkins/build-and-test.sh
@@ -123,7 +123,7 @@ if [ "$KUDU_ALLOW_SKIPPED_TESTS" == "1" ]; then
fi
# If a commit messages contains a line that says 'DONT_BUILD', exit immediately.
- DONT_BUILD=$(git show|egrep '^\s{4}DONT_BUILD$')
+ DONT_BUILD=$(git show -s --format=%B | egrep '^DONT_BUILD\s*$')
if [ "x$DONT_BUILD" != "x" ]; then
echo
echo ------------------------------------------------------------
@@ -206,16 +206,29 @@ list_flaky_tests() {
TEST_LOGDIR="$BUILD_ROOT/test-logs"
TEST_DEBUGDIR="$BUILD_ROOT/test-debug"
+CLEAN_THIRDPARTY=$(git show -s --format=%B | egrep '^CLEAN_THIRDPARTY\s*$')
+
+clean_thirdparty_if_needed() {
+ if [ -n "$CLEAN_THIRDPARTY" ]; then
+ echo "CLEAN_THIRDPARTY is set, cleaning thirdparty folder."
+ git clean -xfd $THIRDPARTY_DIR
+ fi
+}
+
cleanup() {
- echo Cleaning up all build artifacts and temporary data...
- $SOURCE_ROOT/build-support/jenkins/post-build-clean.sh
+ # If we're running inside Jenkins (the BUILD_TAG is set), then install
+ # an exit handler which will clean up all of our build results and temporary
+ # data.
+ if [ -n "$BUILD_TAG" ]; then
+ echo Cleaning up all build artifacts and temporary data...
+ $SOURCE_ROOT/build-support/jenkins/post-build-clean.sh
+ fi
+ clean_thirdparty_if_needed
}
-# If we're running inside Jenkins (the BUILD_TAG is set), then install
-# an exit handler which will clean up all of our build results and temporary
-# data.
-if [ -n "$BUILD_TAG" ]; then
- trap cleanup EXIT
-fi
+
+trap cleanup EXIT
+
+clean_thirdparty_if_needed
ARTIFACT_ARCH=$(uname -m)
# Configure the build