tf-a-lts-patch-stack-watcher.yaml: can on/off function individually
Add switches to enable/disable the following functions
1. Patch auto submission
2. Allow-CI job auto submission
Signed-off-by: Arthur She <arthur.she@linaro.org>
Change-Id: Ia1237cc0898f2bca17d84f13009cf8a75eb1209a
diff --git a/scripts/tf-a-lts-patch-stack-watcher.sh b/scripts/tf-a-lts-patch-stack-watcher.sh
index 1592035..3e8f635 100755
--- a/scripts/tf-a-lts-patch-stack-watcher.sh
+++ b/scripts/tf-a-lts-patch-stack-watcher.sh
@@ -118,13 +118,21 @@
echo "Triggered by comment-added"
# Check eack patch. if all patches meet the submit requirements
# merge it
- submit_patch_stack ${GERRIT_CHANGE_NUMBER}
+ if [ "${ENABLE_PATCH_AUTO_SUBMISSION}" == "true" ]; then
+ submit_patch_stack ${GERRIT_CHANGE_NUMBER}
+ else
+ echo "Patch auto submission function is disabled"
+ fi
;;
"patchset-created")
echo "Triggered by patchset-created"
# New patch / patch stack is created
# Set Allow-CI on the top of it
- trigger_allow_ci_on_top_of_patch_stack ${GERRIT_CHANGE_NUMBER}
+ if [ "${ENABLE_AUTO_ALLOW_CI_JOB}" == "true" ]; then
+ trigger_allow_ci_on_top_of_patch_stack ${GERRIT_CHANGE_NUMBER}
+ else
+ echo "Allow-CI job auto submission function is disabled"
+ fi
;;
esac
rm -f ${err_msg}