I want to abort my jenkins freestyle job, if the gerrit patchset has a topic applied to it, I am using the gerrit-trigger plugin for jenkins. The freestyle job is getting triggerd on each new patchset upload.
I noticed that if there is a topic applied to the incoming patchset the GERRIT_TOPIC variable from the gerrit plugin is NOT empty:
#!"C:\Program Files\Git\bin\bash" -xe
if [ -z "$GERRIT_TOPIC" ]
then
echo "GERRIT_TOPIC is empty"
echo $GERRIT_TOPIC
else
echo "GERRIT_TOPIC is NOT empty"
echo $GERRIT_TOPIC
fi