eclair: Remove Gerrit comment scripts
Have been migrated to the common tf-ci-scripts repo.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: Ia36e2b88aee85fe97cd6a439f43cdea37ac37f2b
diff --git a/eclair/post_gerrit_comment.sh b/eclair/post_gerrit_comment.sh
deleted file mode 100755
index 7388416..0000000
--- a/eclair/post_gerrit_comment.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2019-2022, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-set -ex
-
-# Set to 0 to temporarily disable posting comments to Gerrit.
-should_post_comment=1
-
-# Directory where this script resides.
-SCRIPT_DIR="$(cd "$(dirname "$0")" ; echo "${PWD}")"
-
-# Don't post comments if run on the staging server.
-if echo "$JENKINS_URL" | grep -q "ci\.staging"; then
- should_post_comment=0
-fi
-
-# Always enable posting comments to sandbox (test) projects, even if they're
-# disabled above.
-if echo "${GERRIT_PROJECT}" | grep -q sandbox; then
- should_post_comment=1
-fi
-
-# If run without a patch (e.g. for debugging, don't try to post comment.
-if [ -z "$GERRIT_CHANGE_NUMBER" ]; then
- should_post_comment=0
-fi
-
-if [ $should_post_comment -eq 1 ]; then
- mkdir -p ~/.ssh/
- ssh-keyscan -H -p 29418 $GERRIT_HOST >> ~/.ssh/known_hosts
-
- quoted="$(python3 $SCRIPT_DIR/prepare_gerrit_comment.py misra_delta.txt)"
-
- ssh -o "PubkeyAcceptedKeyTypes +ssh-rsa" -p 29418 -i "$CI_BOT_KEY" "$CI_BOT_USERNAME@$GERRIT_HOST" gerrit \
- review "$GERRIT_CHANGE_NUMBER,$GERRIT_PATCHSET_NUMBER" \
- --message "$quoted"
-fi
diff --git a/eclair/prepare_gerrit_comment.py b/eclair/prepare_gerrit_comment.py
deleted file mode 100755
index 1ef0052..0000000
--- a/eclair/prepare_gerrit_comment.py
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env python3
-#
-# Copyright (c) 2022 Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-
-# Script to prepare a textual body of a comment to pass on the command line
-# to Gerrit: limit it to acceptable size and quote properly.
-
-import sys
-import shlex
-
-
-SIZE_LIMIT = 16000
-
-
-body = ""
-
-with open(sys.argv[1], "r") as f:
- for l in f:
- body += l
- if len(body) >= SIZE_LIMIT:
- body += """\
-[...]
-
-WARNING: The report was trimmed due to size limit of a Gerrit comment.
-Follow the link at the beginning to see the full report.
-"""
- break
-
-sys.stdout.write(shlex.quote(body))