Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

build(travis): gracefully shut down the sauce connect tunnel after th… #12921

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ script:
- ./scripts/travis/build.sh

after_script:
- ./scripts/travis/tear_down_browser_provider.sh
- ./scripts/travis/print_logs.sh

notifications:
Expand Down
8 changes: 8 additions & 0 deletions lib/browserstack/teardown_tunnel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

set -e -o pipefail


echo "Shutting down Browserstack tunnel"
echo "TODO: implement me"
exit 1
16 changes: 16 additions & 0 deletions lib/saucelabs/teardown_tunnel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -e -o pipefail


echo "Shutting down Sauce Connect tunnel"

killall sc

while [[ -n `ps -ef | grep "bin/sc" | grep -v "grep"` ]]; do
printf "."
sleep .5
done

echo ""
echo "Sauce Connect tunnel has bee shut down"
4 changes: 4 additions & 0 deletions scripts/travis/tear_down_browser_provider.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
# Has to be run from project root directory.

./lib/${BROWSER_PROVIDER}/teardown_tunnel.sh