summaryrefslogtreecommitdiffstats
path: root/.travis
diff options
context:
space:
mode:
authorLennart Weller <lhw@ring0.de>2017-01-24 15:21:09 +0000
committerLennart Weller <lhw@ring0.de>2017-01-24 15:21:09 +0000
commit3ed3b02ed96ddab1c084811f3579b3a2aec83e04 (patch)
tree7a61ab288ae47800c4f11be5677d6ad8288dcd98 /.travis
parentNew upstream version 1.4.0+dfsg (diff)
downloadnetdata-3ed3b02ed96ddab1c084811f3579b3a2aec83e04.tar.xz
netdata-3ed3b02ed96ddab1c084811f3579b3a2aec83e04.zip
New upstream version 1.5.0+dfsgupstream/1.5.0+dfsg
Diffstat (limited to '.travis')
-rwxr-xr-x.travis/decrypt-if-have-key33
-rwxr-xr-x.travis/deploy-if-have-key44
-rw-r--r--.travis/travis_rsa.encbin0 -> 1680 bytes
3 files changed, 77 insertions, 0 deletions
diff --git a/.travis/decrypt-if-have-key b/.travis/decrypt-if-have-key
new file mode 100755
index 000000000..7fcab8970
--- /dev/null
+++ b/.travis/decrypt-if-have-key
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+set -e
+
+# Decrypt our private files; changes to this file should be inspected
+# closely to ensure they do not create information leaks
+
+eval key="\${encrypted_${1}_key}"
+eval iv="\${encrypted_${1}_iv}"
+
+if [ ! "$key" ]
+then
+ echo "No aes key present - skipping decryption"
+ exit 0
+fi
+
+for i in .travis/*.enc
+do
+ u=$(echo $i | sed -e 's/.enc$//')
+ openssl aes-256-cbc -K "$key" -iv "$iv" -in $i -out $u -d
+done
+
+if [ -f .travis/travis_rsa ]
+then
+ echo "ssh key present - loading to agent"
+ # add key, then remove to prevent leaks
+ chmod 600 .travis/travis_rsa
+ ssh-add .travis/travis_rsa
+ rm -f .travis/travis_rsa
+ touch /tmp/ssh-key-loaded
+else
+ echo "No ssh key present - skipping agent start"
+fi
diff --git a/.travis/deploy-if-have-key b/.travis/deploy-if-have-key
new file mode 100755
index 000000000..50e69b939
--- /dev/null
+++ b/.travis/deploy-if-have-key
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+set -e
+
+# Deploy tar-files and checksums to the firehol website
+
+if [ ! -f /tmp/ssh-key-loaded ]
+then
+ echo "No ssh key decrypted - skipping deployment to website"
+ exit 0
+fi
+
+case "$TRAVIS_BRANCH" in
+ master|stable-*)
+ :
+ ;;
+ *)
+ echo "Not on master or stable-* branch - skipping deployment to website"
+ exit 0
+ ;;
+esac
+
+if [ "$TRAVIS_PULL_REQUEST" = "true" ]
+then
+ echo "Building pull request - skipping deployment to website"
+ exit 0
+fi
+
+if [ "$TRAVIS_TAG" != "" ]
+then
+ echo "Building tag - skipping deployment to website"
+ exit 0
+fi
+
+if [ "$CC" != "gcc" ]
+then
+ echo "Building non-gcc version - skipping deployment to website"
+ exit 0
+fi
+
+ssh-keyscan -H firehol.org >> ~/.ssh/known_hosts
+ssh travis@firehol.org mkdir -p uploads/netdata/$TRAVIS_BRANCH/
+scp -p *.tar.* travis@firehol.org:uploads/netdata/$TRAVIS_BRANCH/
+ssh travis@firehol.org touch uploads/netdata/$TRAVIS_BRANCH/complete.txt
diff --git a/.travis/travis_rsa.enc b/.travis/travis_rsa.enc
new file mode 100644
index 000000000..148a425bc
--- /dev/null
+++ b/.travis/travis_rsa.enc
Binary files differ