Adapt local environment to events-aws-kinesis

The kinesis-events plugin was originally hosted in GerritHub[1], and
then moved to gerrit-review[2] with the name of 'events-aws-kinesis'.

Adapt the local environment to use the events-aws-kinesis plugin.

[1]https://review.gerrithub.io/admin/repos/GerritForge/kinesis-events
[2]https://gerrit-review.googlesource.com/admin/repos/plugins/events-aws-kinesis

Bug: Issue 14417
Change-Id: I4fea59913664c69543cb90db43b846c20ad761f7
diff --git a/setup_local_env/configs/gerrit.config b/setup_local_env/configs/gerrit.config
index 58772f0..02c3c45 100644
--- a/setup_local_env/configs/gerrit.config
+++ b/setup_local_env/configs/gerrit.config
@@ -50,7 +50,7 @@
     enableAutoCommit = true
     autoCommitIntervalMs = 1000
     autoOffsetReset = latest
-[plugin "kinesis-events"]
+[plugin "events-aws-kinesis"]
     numberOfSubscribers = 6
     pollingIntervalMs = 1000
     region = us-east-1
diff --git a/setup_local_env/setup.sh b/setup_local_env/setup.sh
index a29e858..4b0ddb6 100755
--- a/setup_local_env/setup.sh
+++ b/setup_local_env/setup.sh
@@ -441,9 +441,9 @@
 fi
 
 if [ "$BROKER_TYPE" = "kinesis" ]; then
-echo "Downloading kinesis-events plugin master (TODO: replace with $GERRIT_BRANCH, once we have build)"
-  wget $GERRIT_CI/plugin-kinesis-events-gh-bazel-master-$GERRIT_BRANCH/$LAST_BUILD/kinesis-events/kinesis-events.jar \
-  -O $DEPLOYMENT_LOCATION/kinesis-events.jar || { echo >&2 "Cannot download kinesis-events plugin: Check internet connection. Abort\
+echo "Downloading events-aws-kinesis plugin $GERRIT_BRANCH"
+  wget $GERRIT_CI/plugin-events-aws-kinesis-bazel-master-$GERRIT_BRANCH/$LAST_BUILD/events-aws-kinesis/events-aws-kinesis.jar \
+  -O $DEPLOYMENT_LOCATION/events-aws-kinesis.jar || { echo >&2 "Cannot download events-aws-kinesis plugin: Check internet connection. Abort\
 ing"; exit 1; }
 fi
 
@@ -506,7 +506,11 @@
   cp -f $DEPLOYMENT_LOCATION/events-broker.jar $LOCATION_TEST_SITE_1/lib/events-broker.jar
 
   echo "Copy $BROKER_TYPE events plugin"
-  cp -f $DEPLOYMENT_LOCATION/$BROKER_TYPE-events.jar $LOCATION_TEST_SITE_1/plugins/$BROKER_TYPE-events.jar
+  if [ $BROKER_TYPE = "kinesis" ]; then
+     cp -f $DEPLOYMENT_LOCATION/events-aws-kinesis.jar $LOCATION_TEST_SITE_1/plugins/events-aws-kinesis.jar
+  else
+     cp -f $DEPLOYMENT_LOCATION/$BROKER_TYPE-events.jar $LOCATION_TEST_SITE_1/plugins/$BROKER_TYPE-events.jar
+  fi
 
   echo "Copy metrics-reporter-prometheus plugin"
   cp -f $DEPLOYMENT_LOCATION/metrics-reporter-prometheus.jar $LOCATION_TEST_SITE_1/plugins/metrics-reporter-prometheus.jar