]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-pr*: Skip make check and API jobs for .github and qa dirs skipdotgithub
authorDavid Galloway <dgallowa@redhat.com>
Fri, 24 Jun 2022 17:52:08 +0000 (13:52 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Fri, 24 Jun 2022 17:52:08 +0000 (13:52 -0400)
Signed-off-by: David Galloway <dgallowa@redhat.com>
ceph-pr-api/build/build
ceph-pull-requests/build/build
scripts/build_utils.sh

index 5ad02176cc13b44ec8a0e4e107327b21d1ef819c..02f6f8669f3d996e98836874f212f08838da6164 100644 (file)
@@ -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
 
index 9e74e3332e4f2bf664ffd0c6f03c957ca9a3ced1..5752eee2469d893a195e933bcfc918cd60728b7d 100644 (file)
@@ -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
 
index eb92b3232a7025754eedb64e668d702ed0880210..192bc6c99eeb845c486f2af3883df4ca24de6970 100755 (executable)
@@ -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
 }