scripts: jenkins_verify.sh: skip build when nothing changed [1/1]
PD#SWPL-67525
Problem:
Still build when nothing changed
Solution:
For dailybuild and release, skip build when nothing changed.
Verify:
ad401_a113l
Change-Id: I98e76a0761473d398823e925dcdac5108d300c81
Signed-off-by: Keguang Zhang <keguang.zhang@gmail.com>
diff --git a/jenkins_verify.sh b/jenkins_verify.sh
index d7e8b54..c9a3510 100755
--- a/jenkins_verify.sh
+++ b/jenkins_verify.sh
@@ -20,18 +20,18 @@
fi
if [ "$SUBMIT_TYPE" = "daily" ];then
- BUILDCHECK_BASE_PATH=/mnt/fileroot/autobuild/workdir/workspace/RTOS/RTOS_SDK/dailybuild
+ BASE_PATH=/mnt/fileroot/autobuild/workdir/workspace/RTOS/RTOS_SDK/dailybuild
elif [ "$SUBMIT_TYPE" = "release" ];then
- BUILDCHECK_BASE_PATH=/mnt/fileroot/autobuild/workdir/workspace/RTOS/RTOS_SDK/dailybuild_release
+ BASE_PATH=/mnt/fileroot/autobuild/workdir/workspace/RTOS/RTOS_SDK/dailybuild_release
elif [ "$SUBMIT_TYPE" = "patch" ];then
- BUILDCHECK_BASE_PATH=/mnt/fileroot/autobuild/workdir/workspace/RTOS/RTOS_SDK/patchbuild
+ BASE_PATH=/mnt/fileroot/autobuild/workdir/workspace/RTOS/RTOS_SDK/patchbuild
elif [ "$SUBMIT_TYPE" = "every" ];then
- BUILDCHECK_BASE_PATH=/mnt/fileroot/jenkins/build-check
+ BASE_PATH=/mnt/fileroot/jenkins/build-check
fi
MATCH_PATTERN="projects/"
BRANCH=${MANIFEST_BRANCH#*${MATCH_PATTERN}}
-WORK_DIR=$BUILDCHECK_BASE_PATH/$PROJECT_NAME/$BRANCH
+WORK_DIR=$BASE_PATH/$PROJECT_NAME/$BRANCH
OUTPUT_DIR=$WORK_DIR/output
MANIFEST="$OUTPUT_DIR/manifest.xml"
@@ -108,6 +108,7 @@
echo -e "================\n"
else
echo -e "======== Nothing changed since last build ========\n"
+ [[ "$SUBMIT_TYPE" == "daily" || "$SUBMIT_TYPE" == "release" ]] && exit 0
fi
fi