[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Move travis related functionality into deploy.sh
commit 95030cb231abbab9c26b85ed579293daae3a5dcd
Author: Arturo Filastò <arturo@xxxxxxxxxxx>
Date: Wed Dec 7 12:36:37 2016 +0000
Move travis related functionality into deploy.sh
This avoids people submitting PRs from forks getting build errors
---
.travis.yml | 11 +----------
scripts/deploy.sh | 18 +++++++++++++++++-
2 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index c4dec09..adff6ff 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,12 +19,6 @@ env:
# this points the latest stable
- TWISTED=Twisted
before_install:
- # Decrypt the travis secrets
- - 'openssl aes-256-cbc -K $encrypted_7943e2e6169a_key -iv $encrypted_7943e2e6169a_iv -in secrets/secrets.tar.enc -out secrets/secrets.tar -d'
- - tar xvf secrets/secrets.tar --directory secrets
- - mkdir -p $HOME/.ssh/
- - mv secrets/id_rsa_travis $HOME/.ssh/
-
# Setup deb.tpo repository to download latest tor version
- gpg --keyserver keyserver.ubuntu.com --recv A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89
- gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
@@ -35,10 +29,6 @@ before_install:
python:
- "2.7"
install:
- # Install docker-machine
- - 'curl -L https://github.com/docker/machine/releases/download/v0.8.2/docker-machine-`uname -s`-`uname -m` > docker-machine'
- - sudo mv docker-machine /usr/local/bin/docker-machine
- - sudo chmod +x /usr/local/bin/docker-machine
# command to install dependencies
# the first is for testing pip and the second for setuptools
- pip install $TWISTED pyOpenSSL coveralls
@@ -50,6 +40,7 @@ install:
script:
- sudo $(which coverage) run $(which trial) ooni
- pip list
+ # Cleanup _trial_temp
- sudo rm -rf _trial_temp/
after_success:
- coveralls
diff --git a/scripts/deploy.sh b/scripts/deploy.sh
index 5563459..8da5c6b 100755
--- a/scripts/deploy.sh
+++ b/scripts/deploy.sh
@@ -5,9 +5,25 @@
set -e
SSH_KEY=$1
-
MACHINE_NAME="ooniprobe"
+if [ $TRAVIS == 'true' ];then
+ # Decrypt the travis secrets
+ openssl aes-256-cbc -K $encrypted_7943e2e6169a_key \
+ -iv $encrypted_7943e2e6169a_iv \
+ -in secrets/secrets.tar.enc \
+ -out secrets/secrets.tar -d
+
+ tar xvf secrets/secrets.tar --directory secrets
+ mkdir -p $HOME/.ssh/
+ mv secrets/id_rsa_travis $HOME/.ssh/
+
+ # Install docker-machine
+ curl -L https://github.com/docker/machine/releases/download/v0.8.2/docker-machine-`uname -s`-`uname -m` > docker-machine
+ sudo mv docker-machine /usr/local/bin/docker-machine
+ sudo chmod +x /usr/local/bin/docker-machine
+fi
+
echo "Using SSH Key $SSH_KEY"
(docker-machine status $MACHINE_NAME 2>&1 | grep -q "Host does not exist") && \
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits