]> arthur.barton.de Git - netdata.git/blob - .travis/deploy-if-have-key
fail2bain plugin: "Currently In Jail" chart renamed
[netdata.git] / .travis / deploy-if-have-key
1 #!/bin/bash
2
3 set -e
4
5 # Deploy tar-files and checksums to the firehol website
6
7 if [ ! -f /tmp/ssh-key-loaded ]
8 then
9   echo "No ssh key decrypted - skipping deployment to website"
10   exit 0
11 fi
12
13 case "$TRAVIS_BRANCH" in
14   master|stable-*)
15     :
16   ;;
17   *)
18     echo "Not on master or stable-* branch - skipping deployment to website"
19     exit 0
20   ;;
21 esac
22
23 if [ "$TRAVIS_PULL_REQUEST" = "true" ]
24 then
25   echo "Building pull request - skipping deployment to website"
26   exit 0
27 fi
28
29 if [ "$TRAVIS_TAG" != "" ]
30 then
31   echo "Building tag - skipping deployment to website"
32   exit 0
33 fi
34
35 if [ "$CC" != "gcc" ]
36 then
37   echo "Building non-gcc version - skipping deployment to website"
38   exit 0
39 fi
40
41 ssh-keyscan -H firehol.org >> ~/.ssh/known_hosts
42 ssh travis@firehol.org mkdir -p uploads/netdata/$TRAVIS_BRANCH/
43 scp -p *.tar.* travis@firehol.org:uploads/netdata/$TRAVIS_BRANCH/
44 ssh travis@firehol.org touch uploads/netdata/$TRAVIS_BRANCH/complete.txt