summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Emm. Katsoulakis <34388743+paulkatsoulakis@users.noreply.github.com>2019-06-12 11:11:53 +0300
committerGitHub <noreply@github.com>2019-06-12 11:11:53 +0300
commit08b0212bf975b2602506eab41d5d28d48a8268cf (patch)
tree42e3bfea66c11539136e7331580caae0534a77b3
parent7ee5dc37ae6bca9945db518b2b0cc7d69ce36ae0 (diff)
netdata/packaging: Add option for slack messages to be pushed on alternative channel, than the default. Push all info to #automation, make #ci-status error reporting only (#6268)
I 'll be monitoring closely the change - it is related to our CI and does not directly affect our customers
-rw-r--r--.travis.yml18
-rwxr-xr-xtests/installer/slack.sh7
2 files changed, 16 insertions, 9 deletions
diff --git a/.travis.yml b/.travis.yml
index 2f3180a6c3..fd7e21753e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -105,7 +105,7 @@ stages:
- sudo apt-get install -y wget lxc lxc-templates
- source tests/installer/slack.sh
before_script:
- - post_message "TRAVIS_MESSAGE" "Starting package preparation and publishing for ${BUILD_STRING}.${BUILD_ARCH}"
+ - post_message "TRAVIS_MESSAGE" "Starting package preparation and publishing for ${BUILD_STRING}.${BUILD_ARCH}" "automation"
- export PACKAGES_DIRECTORY="$(mktemp -d -t netdata-packaging-contents-dir-XXXXXX)" && echo "Created packaging directory ${PACKAGES_DIRECTORY}"
- export BUILD_VERSION=$(cat packaging/version | cut -d'-' -f1) # We always build on the latest release
script:
@@ -155,7 +155,7 @@ stages:
- sudo apt-get install -y wget lxc lxc-templates
- source tests/installer/slack.sh
before_script:
- - post_message "TRAVIS_MESSAGE" "Starting package preparation and publishing for ${BUILD_STRING}.${BUILD_ARCH}"
+ - post_message "TRAVIS_MESSAGE" "Starting package preparation and publishing for ${BUILD_STRING}.${BUILD_ARCH}" "automation"
- export PACKAGES_DIRECTORY="$(mktemp -d -t netdata-packaging-contents-dir-XXXXXX)" && echo "Created packaging directory ${PACKAGES_DIRECTORY}"
- export BUILD_VERSION=$(cat packaging/version | cut -d'-' -f1) # We always build on the latest release
script:
@@ -351,7 +351,7 @@ jobs:
- stage: Packaging for release
name: Generate changelog and TAG the release (only on special commit msg)
- before_script: post_message "TRAVIS_MESSAGE" "Packaging step for release initiated"
+ before_script: post_message "TRAVIS_MESSAGE" "Packaging step for release initiated" "automation"
script:
- echo "GIT Branch:" && git branch
- echo "Last commit:" && git log -1
@@ -537,7 +537,7 @@ jobs:
- stage: Publish for release
name: Build & Publish docker images
- before_script: post_message "TRAVIS_MESSAGE" "Publishing docker images"
+ before_script: post_message "TRAVIS_MESSAGE" "Publishing docker images" "automation"
script:
- echo "GIT Branch:" && git branch
- echo "Last commit:" && git log -1
@@ -554,7 +554,7 @@ jobs:
if: tag !~ /(-rc)/
- name: Create release draft
- before_script: post_message "TRAVIS_MESSAGE" "Drafting release on github"
+ before_script: post_message "TRAVIS_MESSAGE" "Drafting release on github" "automation"
script:
- echo "GIT Branch:" && git branch
- echo "Last commit:" && git log -1
@@ -575,7 +575,7 @@ jobs:
name: Run coverity scan
# Just notify people that Nightly ops triggered, use the first step as a hook to do that
- before_script: post_message "TRAVIS_MESSAGE" "Starting nightly operations"
+ before_script: post_message "TRAVIS_MESSAGE" "Starting nightly operations" "automation"
script: ./coverity-install.sh && ./coverity-scan.sh || echo "Coverity failed :("
- name: Kickstart files integrity testing (extended)
@@ -586,7 +586,7 @@ jobs:
# This is generating the changelog for nightly release and publish it
- name: Generate nightly changelog
- before_script: post_message "TRAVIS_MESSAGE" "Starting changelog generation for nightlies"
+ before_script: post_message "TRAVIS_MESSAGE" "Starting changelog generation for nightlies" "automation"
script: ".travis/nightlies.sh"
after_failure: post_message "TRAVIS_MESSAGE" "<!here> Nightly changelog generation failed"
git:
@@ -599,7 +599,7 @@ jobs:
- stage: Nightly release
name: Build & Publish docker images
- before_script: post_message "TRAVIS_MESSAGE" "Publishing docker images for nightlies"
+ before_script: post_message "TRAVIS_MESSAGE" "Publishing docker images for nightlies" "automation"
script:
- echo "GIT Branch:" && git branch
- echo "Last commit:" && git log -1
@@ -615,7 +615,7 @@ jobs:
env: ALLOW_SOFT_FAILURE_HERE=true
- name: Create nightly release artifacts, publish to GCS
- before_script: post_message "TRAVIS_MESSAGE" "Starting artifacts generation for nightlies"
+ before_script: post_message "TRAVIS_MESSAGE" "Starting artifacts generation for nightlies" "automation"
script:
- echo "GIT Branch:" && git branch
- echo "Last commit:" && git log -1
diff --git a/tests/installer/slack.sh b/tests/installer/slack.sh
index 3c5f94a453..83cb5fa7c4 100755
--- a/tests/installer/slack.sh
+++ b/tests/installer/slack.sh
@@ -13,6 +13,7 @@
post_message() {
TYPE="$1"
MESSAGE="$2"
+ CUSTOM_CHANNEL="$3"
case "$TYPE" in
"PLAIN_MESSAGE")
@@ -24,7 +25,13 @@ post_message() {
EVENT_LINE="${TRAVIS_JOB_NUMBER}: Event type '${TRAVIS_EVENT_TYPE}' #${TRAVIS_PULL_REQUEST}, on '${TRAVIS_OS_NAME}' "
fi
+ if [ -n "${CUSTOM_CHANNEL}" ]; then
+ echo "Sending travis message to custom channel ${CUSTOM_CHANNEL}"
+ OPTIONAL_CHANNEL_INFO="\"channel\": \"${CUSTOM_CHANNEL}\","
+ fi
+
POST_MESSAGE="{
+ ${OPTIONAL_CHANNEL_INFO}
\"text\": \"${TRAVIS_REPO_SLUG}, ${MESSAGE}\",
\"attachments\": [{
\"text\": \"${TRAVIS_JOB_NUMBER}: Event type '${TRAVIS_EVENT_TYPE}', on '${TRAVIS_OS_NAME}' \",