From 96e64f159d68f294ebed8363fef4d66b850a27b2 Mon Sep 17 00:00:00 2001 From: Bryan Call Date: Mon, 9 Aug 2021 14:06:05 -0700 Subject: [PATCH] Fix the skipping logic for autest and docs Look at the difference in the main branch instead of looking at the last commit on the branch that is being merged in Turned on debugging for the autest and docs build scripts --- ci/jenkins/bin/autest.sh | 4 ++-- ci/jenkins/bin/docs.sh | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ci/jenkins/bin/autest.sh b/ci/jenkins/bin/autest.sh index 6c49a498ae7..995b472ea8d 100755 --- a/ci/jenkins/bin/autest.sh +++ b/ci/jenkins/bin/autest.sh @@ -16,14 +16,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -set +x +set -x cd src sleep 30 git branch --contains ${ghprbActualCommit} > /dev/null if [ $? = 0 -a ! -z "$ghprbActualCommit" ]; then - git diff ${ghprbActualCommit}^...${ghprbActualCommit} --name-only | egrep -E '^(build|iocore|proxy|tests|include|mgmt|plugins|proxy|src)/' > /dev/null + git diff HEAD~1 --name-only | egrep -E '^(build|iocore|proxy|tests|include|mgmt|plugins|proxy|src)/' > /dev/null if [ $? = 1 ]; then echo "No relevant files changed, skipping run" exit 0 diff --git a/ci/jenkins/bin/docs.sh b/ci/jenkins/bin/docs.sh index b2fe3c30d10..9966280b436 100755 --- a/ci/jenkins/bin/docs.sh +++ b/ci/jenkins/bin/docs.sh @@ -16,6 +16,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +set -x + # These shenanigans are here to allow it to run both manually, and via Jenkins test -z "${ATS_MAKE}" && ATS_MAKE="make" test ! -z "${WORKSPACE}" && cd "${WORKSPACE}/src" @@ -24,7 +26,7 @@ test ! -z "${WORKSPACE}" && cd "${WORKSPACE}/src" INCLUDE_FILES=$(for i in $(git grep literalinclude doc/ | awk '{print $3}'); do basename $i; done | sort -u | paste -sd\|) echo $INCLUDE_FILES if [ ! -z "$ghprbActualCommit" ]; then - git diff ${ghprbActualCommit}^...${ghprbActualCommit} --name-only | egrep -E "(^doc/|$INCLUDE_FILES)" > /dev/null + git diff HEAD~1 --name-only | egrep -E "(^doc/|$INCLUDE_FILES)" > /dev/null if [ $? = 1 ]; then echo "No relevant files changed, skipping run" exit 0