Make job template update best effort

Some instances have failed due to the repo not being configured for the
expected series job templates. This changes the modified file detection
to only look for the zuul files we care about, then not error out on git
operations if it ends up we can't actually commit and propose changes.

Change-Id: Ic301b039d080dfc0bcbefeecce099c8fd00ad8c5
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-04-11 14:45:20 -05:00
parent f2459f8716
commit ab9564f4d6
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
1 changed files with 3 additions and 3 deletions

View File

@ -58,7 +58,7 @@ for fname in $fnames; do
done
# Only submit patch if files were changed
changes=$(git diff-index --name-only HEAD --)
changes=$(git diff-index --name-only HEAD -- | grep zuul)
if [ -n "$changes" ]; then
git checkout -b add-${SERIES}-python-jobtemplates
@ -69,7 +69,7 @@ if [ -n "$changes" ]; then
git clean -f
git diff --cached
git commit -m "$commit_msg"
git commit -m "$commit_msg" || true
git show
git review --yes -f
git review --yes -f || true
fi