summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorwutianwei <wutianwei1@huawei.com>2017-11-09 15:15:40 +0800
committerwutianwei <wutianwei1@huawei.com>2017-11-09 15:53:43 +0800
commitedb87b1eff536892aac65e7c6cf1c19e69791338 (patch)
treea976512dec38c7cf1acc1d0da0847f87ae76c87a /jjb
parent122cf34bf3e656e1b7fa35e07dd8a71e42ed4d59 (diff)
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 <wutianwei1@huawei.com>
Diffstat (limited to 'jjb')
-rw-r--r--jjb/global/releng-macros.yml7
1 files changed, 6 insertions, 1 deletions
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