Do not alert the #automation channel on checksum failures that will fail a PR in CI anyway (#7733)
James Mills committed
Jan 18, 2020 at 00:30 UTC
6d4fa9f3c2b82dc961cfadf619df7189cdababbf
1 file changed
+11
-10
tests/installer/checksums.sh
+11
-10
@@ -1,4 +1,5 @@
1
-#!/bin/bash
1
+#!/bin/sh
2
+
3
#
4
# Mechanism to validate kickstart files integrity status
5
#
@@ -9,16 +10,15 @@
10
set -e
11
12
# If we are not in netdata git repo, at the top level directory, fail
12
-TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel 2> /dev/null || echo "")")
13
-CWD="$(git rev-parse --show-cdup 2> /dev/null || echo "")"
14
-if [ -n "$CWD" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then
15
- echo "Run as ./tests/installer/$(basename "$0") from top level directory of netdata git repository"
16
- echo "Kickstart validation process aborted"
17
- exit 1
13
+TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel 2>/dev/null || echo "")")
14
+CWD="$(git rev-parse --show-cdup 2>/dev/null || echo "")"
15
+if [ -n "$CWD" ] || [ "${TOP_LEVEL}" != "netdata" ]; then
16
+ echo "Run as ./tests/installer/$(basename "$0") from top level directory of netdata git repository"
17
+ echo "Kickstart validation process aborted"
18
+ exit 1
19
fi
20
21
README_DOC="packaging/installer/README.md"
21
-source ./tests/installer/slack.sh
22
23
for file in kickstart.sh kickstart-static64.sh; do
24
README_MD5=$(grep "$file" $README_DOC | grep md5sum | cut -d '"' -f2)
@@ -30,10 +30,11 @@ for file in kickstart.sh kickstart-static64.sh; do
30
# Conditionally run the website validation
31
if [ -z "${LOCAL_ONLY}" ]; then
32
echo "Validating ${KICKSTART_URL} against local file ${KICKSTART} with MD5 ${KICKSTART_MD5}.."
33
- if [ "$KICKSTART_MD5" == "$CALCULATED_MD5" ]; then
33
+ if [ "$KICKSTART_MD5" = "$CALCULATED_MD5" ]; then
34
echo "${KICKSTART_URL} looks fine"
35
else
36
- post_message "TRAVIS_MESSAGE" "Attention <!here> , ${KICKSTART_URL} md5sum does not match local file, it needs to be updated"
36
+ echo "${KICKSTART_URL} md5sum does not match local file, it needs to be updated"
37
+ exit 2
38
fi
39
fi
40