From f79e6699cdb88126f96735774dbc4f42bdc6e213 Mon Sep 17 00:00:00 2001 From: David Galloway Date: Fri, 24 Jun 2022 13:52:08 -0400 Subject: [PATCH] ceph-pr*: Skip make check and API jobs for .github and qa dirs Signed-off-by: David Galloway --- ceph-pr-api/build/build | 6 +++--- ceph-pull-requests/build/build | 6 +++--- scripts/build_utils.sh | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ceph-pr-api/build/build b/ceph-pr-api/build/build index 5ad02176..02f6f866 100644 --- a/ceph-pr-api/build/build +++ b/ceph-pr-api/build/build @@ -1,8 +1,8 @@ #!/bin/bash -e -docs_pr_only -if [ "$DOCS_ONLY" = true ]; then - echo "Only the doc/ dir changed. No need to run make check or API tests." +skip_make_check +if [ "$SKIP_MAKE_CHECK" = true ]; then + echo "Only the doc/, .github, or qa/ dir changed. No need to run make check or API tests." exit 0 fi diff --git a/ceph-pull-requests/build/build b/ceph-pull-requests/build/build index 9e74e333..5752eee2 100644 --- a/ceph-pull-requests/build/build +++ b/ceph-pull-requests/build/build @@ -1,8 +1,8 @@ #!/bin/bash -ex -docs_pr_only -if [ "$DOCS_ONLY" = true ]; then - echo "Only the doc/ dir changed. No need to run make check." +skip_make_check +if [ "$SKIP_MAKE_CHECK" = true ]; then + echo "Only the doc/, .github, or qa/ dir changed. No need to run make check or API tests." exit 0 fi diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index eb92b323..192bc6c9 100755 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -1555,7 +1555,7 @@ maybe_reset_ci_container() { } # NOTE: This function will only work on a Pull Request job! -docs_pr_only() { +skip_make_check() { pushd . # Only try to cd to ceph repo if we need to. # The ceph-pr-commits job checks out ceph.git and ceph-build.git but most @@ -1570,10 +1570,10 @@ docs_pr_only() { files="$(git diff --name-only origin/${ghprbTargetBranch}...origin/pr/${ghprbPullId}/head)" fi echo -e "changed files:\n$files" - if [ $(echo "$files" | grep -v '^doc/' | wc -l) -gt 0 ]; then - DOCS_ONLY=false + if [ $(echo "$files" | grep -v '^doc/\|^.github\|^qa/' | wc -l) -gt 0 ]; then + SKIP_MAKE_CHECK=false else - DOCS_ONLY=true + SKIP_MAKE_CHECK=true fi popd } -- 2.39.5