Sha256: e226eabae4bed886de5012592ab8a053d8929c2229b1d4bc5e762883c9264f6a

Contents?: true

Size: 1.59 KB

Versions: 8

Compression:

Stored size: 1.59 KB

Contents

#!/bin/bash

set -e

# Setup and start Sauce Connect for your TravisCI build
# This script requires your .travis.yml to include the following two private env variables:
# SAUCE_USERNAME
# SAUCE_ACCESS_KEY
# Follow the steps at https://saucelabs.com/opensource/travis to set that up.
#
# Curl and run this script as part of your .travis.yml before_script section:
# before_script:
#   - curl https://gist.github.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash

CONNECT_URL="http://saucelabs.com/downloads/Sauce-Connect-latest.zip"
CONNECT_DIR="/tmp/sauce-connect-$RANDOM"
CONNECT_DOWNLOAD="Sauce_Connect.zip"

mkdir -p $LOGS_DIR
CONNECT_LOG="$LOGS_DIR/sauce-connect"
CONNECT_STDOUT="$LOGS_DIR/sauce-connect.stdout"
CONNECT_STDERR="$LOGS_DIR/sauce-connect.stderr"

# Get Connect and start it
mkdir -p $CONNECT_DIR
cd $CONNECT_DIR
curl $CONNECT_URL -o $CONNECT_DOWNLOAD 2> /dev/null 1> /dev/null
unzip $CONNECT_DOWNLOAD > /dev/null
rm $CONNECT_DOWNLOAD

SAUCE_ACCESS_KEY=`echo $SAUCE_ACCESS_KEY | rev`


ARGS=""

# Set tunnel-id only on Travis, to make local testing easier.
if [ ! -z "$TRAVIS_JOB_NUMBER" ]; then
  ARGS="$ARGS --tunnel-identifier $TRAVIS_JOB_NUMBER"
fi
if [ ! -z "$SAUCE_CONNECT_READY_FILE" ]; then
  ARGS="$ARGS --readyfile $SAUCE_CONNECT_READY_FILE"
fi

echo "Starting Sauce Connect in the background:"
echo "  Arg: $ARGS"
echo "Logging into:"
echo "  Log: $CONNECT_LOG"
echo "  Out: $CONNECT_STDOUT"
echo "  Err: $CONNECT_STDERR"
java -jar Sauce-Connect.jar $ARGS $SAUCE_USERNAME $SAUCE_ACCESS_KEY \
  --logfile $CONNECT_LOG 2> $CONNECT_STDERR 1> $CONNECT_STDOUT &
CONNECT_PID=$!
echo "  Pid: $CONNECT_PID"

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ende-0.5.22 components/indefinido/indemma/master/components/chaijs/chai/1.9.1/support/sauce/sauce_connect_setup.sh
ende-0.5.21 components/indefinido/indemma/master/components/chaijs/chai/1.9.1/support/sauce/sauce_connect_setup.sh
ende-0.5.6 components/chaijs/chai/1.9.1/support/sauce/sauce_connect_setup.sh
ende-0.5.5 components/chaijs/chai/1.9.1/support/sauce/sauce_connect_setup.sh
ende-0.5.4 components/chaijs/chai/1.9.1/support/sauce/sauce_connect_setup.sh
ende-0.5.3 components/chaijs/chai/1.9.1/support/sauce/sauce_connect_setup.sh
ende-0.5.2 components/chaijs/chai/1.9.1/support/sauce/sauce_connect_setup.sh
ende-0.5.1 components/chaijs/chai/1.9.1/support/sauce/sauce_connect_setup.sh