Merge pull request #3199 from sebv/sauce-connect

ci: configured sauce connect
This commit is contained in:
seb vincent
2014-07-23 18:28:56 +08:00
3 changed files with 37 additions and 0 deletions
+4
View File
@@ -40,7 +40,11 @@ before_script:
- 'echo Node.js version: `node -v`'
- npm install -g jshint grunt-cli mocha
- npm install
- "./ci/installers/install-sauce-connect.sh"
- "./ci/before_script_extra.sh"
- "ulimit -n 8000"
# disabling sauce-connect until travis ichef issue is sorted
# - "./ci/start-sauce-connect.sh"
script:
- "./ci/script.sh"
- bash -c 'while true; do ping ondemand.saucelabs.com &> /dev/null; sleep 10; done' &
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
set -e
mkdir -p $HOME/tools/sc
cd $HOME/tools/sc
wget -P /tmp https://saucelabs.com/downloads/sc-4.3-osx.zip
unzip /tmp/sc-4.3-osx.zip -d $HOME/tools/sc
echo 'export PATH=$HOME/tools/sc/sc-4.3-osx/bin:$PATH' > $HOME/tools/sc/env
+25
View File
@@ -0,0 +1,25 @@
#!/bin/bash
SC_DIR="/tmp/sc"
READY_FILE="sc-ready-$RANDOM"
mkdir -p $SC_DIR && cd $SC_DIR
touch $SC_DIR/sauce_connect.log
source $HOME/tools/sc/env
sc \
-u $SAUCE_USERNAME \
-k $SAUCE_ACCESS_KEY \
--readyfile $READY_FILE\
--tunnel-identifier $TRAVIS_JOB_NUMBER \
-l $SC_DIR/sauce_connect.log \
&> /dev/null &
echo 'waiting for sauce connect to start'
tail -f $SC_DIR/sauce_connect.log &
# Wait for Connect to be ready before exiting
while [ ! -f $READY_FILE ]; do
sleep .5
done