From edb87b1eff536892aac65e7c6cf1c19e69791338 Mon Sep 17 00:00:00 2001 From: wutianwei Date: Thu, 9 Nov 2017 15:15:40 +0800 Subject: fix the bug of patch verify If one patch don't modify the "yml" or "yaml" file, the script will exit with 1 at egrep "ya?ml$", then mark build as failure. In my opinion, if not modify the "yml" or "yaml" file, the yamllint should be successful. So we need mark the result of egrep "ya?ml$" as true, then judge the $YAML_FILES. Change-Id: I8abcadc9e4c85935ac7b20cdf54713b9800108ba Signed-off-by: wutianwei --- jjb/global/releng-macros.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'jjb/global') diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml index 62c22bd3f..ba4e930fa 100644 --- a/jjb/global/releng-macros.yml +++ b/jjb/global/releng-macros.yml @@ -405,7 +405,12 @@ echo "Running yaml code on $PROJECT ..." # Get list of yaml files - YAML_FILES=$(git --no-pager diff --diff-filter=MCRAT --name-only HEAD^1 | egrep "ya?ml$") + YAML_FILES=$(git --no-pager diff --diff-filter=MCRAT --name-only HEAD^1 | egrep "ya?ml$") || true + + #If YAML_FILES is none exit with 0 + if [ -z "$YAML_FILES" ]; then + exit 0 + fi # Ensure we start with a clean environment rm -f yaml-violation.log lint.log -- cgit 1.2.3-korg