summaryrefslogtreecommitdiffstats
path: root/tests/installer/slack.sh
diff options
context:
space:
mode:
authorPaul Katsoulakis <34388743+paulkatsoulakis@users.noreply.github.com>2019-03-25 10:05:05 +0000
committerGitHub <noreply@github.com>2019-03-25 10:05:05 +0000
commit8f6b2bba3e0d82b27b26b7da1022e49fe9e09482 (patch)
tree9c8412a14a5dcc179f15f4db9ea23186091cc2f8 /tests/installer/slack.sh
parent9c807630ea5e10144892a5bfc5379b36c2a63e8d (diff)
Integrity testing: Check published kickstart files integrity (#5689)
* netdata/packaging/ci: Integrity testing Introduce a scriptlet that validates kickstart integrity in my-netdata.io against the ones in the repo. Run this through the pipeline on a scheduled manner. Will refine the conditionals later, once i verify the stage is built up as expected * netdata/packaging/ci: remove conditionals first * netdata/packaging/ci: Adjust the names to something more appropriate. Run it along with nightlies * netdata/packager/ci: Cleanup checksum validation for kickstart files (continued) 1) merge validate_kickstart_integrity.sh and tests/installer/checksums.sh 2) run checksums at the new point on the pipeline 3) Change that unstable gitignore check and use a more file-agnostic check that depends only on git that we already require 4) Do not run the kickstart validation on the online website everywhere, only on the nightly runs * netdata/packaging/ci: First rounf of PR feedback adjustments 1) changes wordings as recommended 2) pass file info in parameter and use it in the wordings 3) as shellcheck suggests, use -n instead of ! -z. Makes sense actually, ! -z is kind of reverse logic that confuses More adjustments on a follow up commit * netdata/packaging/ci: Enable slack integration for kickstart validation We want to be notified in a timely manner when the kickstart on the website is outdated. Added a wrapper for incoming webhooks from slack and instead of failing the build we notify slack Added a debug message in the end of the script to validate the process which i will remove on a follow up commit * netdata/packaging/ci: fixes fix sourcing path missed the /, this new keyboard is a pain :p
Diffstat (limited to 'tests/installer/slack.sh')
-rwxr-xr-xtests/installer/slack.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/installer/slack.sh b/tests/installer/slack.sh
new file mode 100755
index 0000000000..817989db92
--- /dev/null
+++ b/tests/installer/slack.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+#
+# Simple incoming webhook for slack integration.
+#
+# The script expects the following parameters to be defined by the upper layer:
+# SLACK_INCOMING_WEBHOOK_URL
+# SLACK_BOT_NAME
+# SLACK_CHANNEL
+#
+# Copyright:
+#
+# Author: Pavlos Emm. Katsoulakis <paul@netdata.cloud
+
+post_message() {
+ MESSAGE="$1"
+ curl -X POST --data-urlencode "payload={\"channel\": \"${SLACK_CHANNEL}\", \"username\": \"${SLACK_BOT_NAME}\", \"text\": \"${MESSAGE}\", \"icon_emoji\": \":space_invader:\"}" ${SLACK_INCOMING_WEBHOOK_URL}
+}