Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 27 lines (23 sloc) 754 Bytes
#!/bin/bash -e
echo "scripts/"
# Fails the build if it was triggered by a non-whitelisted commiter
# Check whitelist
if [[ -z "$GERRIT_WHITELIST_REPO" ]]; then
echo "Whitelist for Grrit contributors not defined for this"
echo "instance, everyone can make CI run!"
exit 0
git init jenkins-whitelist
echo "Fetching whitelist repo from ${GERRIT_WHITELIST_REPO}..."
cd jenkins-whitelist
git fetch "$GERRIT_WHITELIST_REPO" +refs/heads/master:myhead
echo "This script is designed to verify gerrit events only."
exit 0
elif git cat-file -p myhead:jenkins-whitelist.txt | \
grep -E -q -e "^$GERRIT_PATCHSET_UPLOADER_EMAIL\$"; then
exit 0
exit 1
You can’t perform that action at this time.