From f51bb0ea43da33f4a28786dddda4b8d01b2121c4 Mon Sep 17 00:00:00 2001 From: Alan Bernstein Date: Mon, 24 May 2021 20:42:08 -0500 Subject: [PATCH] Update and verbosify job-skipping CI steps --- .circleci/config.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e02e7d45a..ffe55c216 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,11 +37,23 @@ commands: skip-if-root-unchanged: description: "skips the parent job if the PR includes no changes to pilosa" steps: - - run: '[ -n "$(git diff --name-only HEAD $(git merge-base master HEAD) | grep -v \"^lattice/\")" ] || circleci step halt || true' + - run: | + ROOT_CHANGED_FILES="$(git diff --name-only HEAD $(git merge-base master HEAD) | grep -v '^lattice/')" + echo "ROOT_CHANGED_FILES = $ROOT_CHANGED_FILES" + if [ -z $ROOT_CHANGED_FILES ] ; then + echo "halting step" + circleci step halt + fi skip-if-lattice-unchanged: description: "skips the parent job if the PR includes no changes to lattice" steps: - - run: '[ -n "$(git diff --name-only HEAD $(git merge-base master HEAD) | grep ^lattice/\")" ] || circleci step halt || true' + - run: | + LATTICE_CHANGED_FILES="$(git diff --name-only HEAD $(git merge-base master HEAD) | grep '^lattice/')" + echo "LATTICE_CHANGED_FILES = $LATTICE_CHANGED_FILES" + if [ -z $LATTICE_CHANGED_FILES ] ; then + echo "halting step" + circleci step halt + fi jobs: setup: