From: David Galloway Date: Fri, 1 Jun 2018 21:13:42 +0000 (-0400) Subject: ceph-ansible-prs: Don't run auto job if only docs were modified X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=9c79253e49a22387ec7dfbabe04effe0d5f2c697;p=ceph-build.git ceph-ansible-prs: Don't run auto job if only docs were modified Signed-off-by: David Galloway --- diff --git a/ceph-ansible-prs/config/definitions/ceph-ansible-prs.yml b/ceph-ansible-prs/config/definitions/ceph-ansible-prs.yml index b6a3aa1b..76fd8197 100644 --- a/ceph-ansible-prs/config/definitions/ceph-ansible-prs.yml +++ b/ceph-ansible-prs/config/definitions/ceph-ansible-prs.yml @@ -234,10 +234,23 @@ SCENARIO={scenario} RELEASE={release} ANSIBLE_VERSION={ansible_version} - - shell: - !include-raw-escape: - - ../../../scripts/build_utils.sh - - ../../build/build + - conditional-step: + condition-kind: shell + condition-command: | + #!/bin/bash + # Returns 1 if only .rst and README files were modified + echo "Checking if only rst and READMEs were modified" + git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep -v '\.rst\|README' + if [ $? -eq 1 ]; then + echo "Only docs were modified. Skipping the rest of the job." + exit 1 + fi + on-evaluation-failure: dont-run + steps: + - shell: + !include-raw-escape: + - ../../../scripts/build_utils.sh + - ../../build/build publishers: - postbuildscript: