summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2020-04-21 03:17:42 +0200
committerPablo Barciela <[email protected]>2020-04-21 03:28:06 +0200
commit85e50bb1e8b0c07f44ae314adce19286c32b1260 (patch)
treea74dfc3b0576be50d7fe193c2edc8c63199a963e
parent75c85e572ca5c15433275455d0aaed612de60bd0 (diff)
downloadmate-media-85e50bb1e8b0c07f44ae314adce19286c32b1260.tar.bz2
mate-media-85e50bb1e8b0c07f44ae314adce19286c32b1260.tar.xz
Travis CI: enable irc notifications with broken builds
-rw-r--r--.travis.yml32
1 files changed, 22 insertions, 10 deletions
diff --git a/.travis.yml b/.travis.yml
index 360f48c..df1e500 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,16 +24,17 @@ install:
script:
- ./docker-build --name ${DISTRO} --verbose --config .build.yml --build scripts
-after_success:
- - 'if [[ "$TRAVIS_SECURE_ENV_VARS" == "true" && "$TRAVIS_PULL_REQUEST" != "false" && ${DISTRO} =~ ^fedora.*$ ]]; then
- REPO_SLUG_ARRAY=(${TRAVIS_REPO_SLUG//\// });
- REPO_NAME=${REPO_SLUG_ARRAY[1]};
- URL="https://${REPO_NAME}.mate-desktop.dev";
- COMMENT="Code analysis completed";
- curl -H "Authorization: token $GITHUB_TOKEN" -X POST
- -d "{\"state\": \"success\", \"description\": \"$COMMENT\", \"context\":\"scan-build\", \"target_url\": \"$URL\"}"
- https://api.github.com/repos/${TRAVIS_REPO_SLUG}/statuses/${TRAVIS_PULL_REQUEST_SHA};
- fi'
+notifications:
+ irc:
+ if: branch = master AND
+ repo = "mate-desktop/mate-media"
+ channels:
+ - "irc.freenode.org#mate-dev"
+ template:
+ - "[%{repository_name}] %{author}: %{commit_subject}"
+ - "[%{branch}] %{commit} %{message} %{build_url}"
+ on_success: never
+ on_failure: always
deploy:
- provider: pages
@@ -54,6 +55,17 @@ deploy:
tags: true
condition: "${TRAVIS_TAG} =~ ^v.*$ && ${DISTRO} =~ ^fedora.*$"
+after_success:
+ - 'if [[ "$TRAVIS_SECURE_ENV_VARS" == "true" && "$TRAVIS_PULL_REQUEST" != "false" && ${DISTRO} =~ ^fedora.*$ ]]; then
+ REPO_SLUG_ARRAY=(${TRAVIS_REPO_SLUG//\// });
+ REPO_NAME=${REPO_SLUG_ARRAY[1]};
+ URL="https://${REPO_NAME}.mate-desktop.dev";
+ COMMENT="Code analysis completed";
+ curl -H "Authorization: token $GITHUB_TOKEN" -X POST
+ -d "{\"state\": \"success\", \"description\": \"$COMMENT\", \"context\":\"scan-build\", \"target_url\": \"$URL\"}"
+ https://api.github.com/repos/${TRAVIS_REPO_SLUG}/statuses/${TRAVIS_PULL_REQUEST_SHA};
+ fi'
+
env:
- DISTRO="archlinux:latest"
- DISTRO="debian:testing"