diff options
author | Tony Sarajärvi <tony.sarajarvi@qt.io> | 2017-12-29 10:22:08 +0200 |
---|---|---|
committer | Tony Sarajärvi <tony.sarajarvi@qt.io> | 2018-01-02 12:52:35 +0000 |
commit | 4fb893fcf8ef55ff3ebbdf684c4d1cfab913cea0 (patch) | |
tree | 64a257a3974b7a116dde5ba2fc124f4c12e162c8 /coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64 | |
parent | b9aae857f9e2dbcc444a099a8345dc8ac31ff47e (diff) |
Set up proxy for provisioning scripts
Task-number: QTQAINFRA-1669
Change-Id: I582dc5037bd2b46dcd5c9c3b2cb13784e122d6a5
Reviewed-by: Simo Fält <simo.falt@qt.io>
Diffstat (limited to 'coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64')
-rwxr-xr-x | coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/01-systemsetup.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/01-systemsetup.sh b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/01-systemsetup.sh index e541d83b..b44c3014 100755 --- a/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/01-systemsetup.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-16.04-x86_64/01-systemsetup.sh @@ -40,6 +40,7 @@ set -ex source "${BASH_SOURCE%/*}/../common/try_catch.sh" +source "${BASH_SOURCE%/*}/../common/check_and_set_proxy.sh" NTS_IP=10.212.2.216 @@ -47,6 +48,7 @@ ExceptionGsettings1=100 ExceptionGsettings2=101 ExceptionGsettings3=102 ExceptionNTS=103 +ExceptionProxy=104 try ( @@ -59,6 +61,10 @@ try echo "Set Network Test Server address to $NTS_IP in /etc/hosts" echo "$NTS_IP qt-test-server qt-test-server.qt-test-net" | sudo tee -a /etc/hosts || throw $ExceptionNTS + + if [ "$proxy" != "" ]; then + echo "Acquire::http::Proxy \"$proxy\";" | sudo tee -a /etc/apt/apt.conf || throw $ExceptionProxy + fi ) catch || { case $ex_code in @@ -78,6 +84,10 @@ catch || { echo "Failed to set network teset server address into /etc/hosts." exit 1; ;; + $ExceptionProxy) + echo "Failed to set proxy /etc/apt/apt.conf." + exit 1; + ;; esac } |