# http://www.eclipse.org/legal/epl-v10.html
##############################################################################
echo "---> check-info-votes.sh"
-set -xe -o pipefail
+set -u unset
ref=$(echo "$GERRIT_REFSPEC" | awk -F"/" '{ print $4 }')
pip="pip3"
$pip install --user lftools[nexus]
$pip install --user jsonschema
-change="$(echo "$GERRIT_CHANGE_URL" | awk -F"/" '{print $NF}')"
echo "Checking votes:"
lftools infofile check-votes INFO.yaml "$GERRIT_URL" "$ref" > gerrit_comment.txt
exit_status="$?"
exit "$exit_status"
else
echo "Vote completed submitting review"
- ssh -p "$GERRIT_PORT" "$JENKINS_SSH_CREDENTIAL"@"$GERRIT_HOST" gerrit review "$change" --submit
+ ssh -p "$GERRIT_PORT" "$USER"@"$GERRIT_HOST" gerrit review "$GERRIT_PATCHSET_REVISION" --verified 1
+ sleep 5
+ ssh -p "$GERRIT_PORT" "$USER"@"$GERRIT_HOST" gerrit review "$GERRIT_PATCHSET_REVISION" --submit
fi