3 # setup : script to setup required runtime environment. This script can be run again to update anything
4 # this should stay in your project directory
7 # save console output in setup_<timestamp>.log file in project directory
8 timestamp=$(date +"%m%d%Y_%H%M%S")
9 LOG_FILE=setup_$timestamp.log
10 exec > >(tee -a ${LOG_FILE} )
11 exec 2> >(tee -a ${LOG_FILE} >&2)
19 --target="$path/robot/library" \
20 --extra-index-url="https://nexus3.onap.org/repository/PyPi.staging/simple" \
21 'robotframework-seleniumlibrary==3.3.1' \
22 'robotframework-databaselibrary==1.2' \
23 'robotframework-angularjs==0.0.9' \
24 'robotframework-requests==0.5.0' \
25 'robotframework-sshlibrary==3.3.0' \
26 'robotframework-ftplibrary==1.6' \
27 'robotframework-archivelibrary==0.4.0' \
28 'robotframework-onap==0.5'
31 if [ -d $path/testsuite/heatbridge ]
33 # Support LF build location
34 cd $path/testsuite/heatbridge
37 git config --global http.sslVerify false
38 if [ -d ~/heatbridge ]
41 git pull origin master
43 git clone https://gerrit.onap.org/r/testsuite/heatbridge.git
52 --target="$path/robot/library" \
55 # Go back to execution folder
58 # if the script is running during the image build skip the rest of it
59 # as required software is installed already.
62 # we need to update PATH with chromium-chromedriver
63 echo "Adding in-container chromedriver to PATH"
64 ln -s /usr/lib/chromium-browser/chromedriver /usr/local/bin/chromedriver
66 echo "Skipping desktop steps, building container image..."
69 # Get the appropriate chromedriver. Default to linux64
71 CHROMEDRIVER_URL=http://chromedriver.storage.googleapis.com/2.43
72 CHROMEDRIVER_ZIP=chromedriver_linux64.zip
73 CHROMEDRIVER_TARGET=chromedriver.zip
75 # Handle mac and windows
79 CHROMEDRIVER_ZIP=chromedriver_win32.zip
82 CHROMEDRIVER_ZIP=chromedriver_mac64.zip
84 *) echo "Defaulting to Linux 64" ;;
87 if [ $CHROMEDRIVER_ZIP == 'chromedriver_linux64.zip' ]
89 curl $CHROMEDRIVER_URL/$CHROMEDRIVER_ZIP -o $CHROMEDRIVER_TARGET
90 unzip chromedriver.zip -d /usr/local/bin
92 curl $CHROMEDRIVER_URL/$CHROMEDRIVER_ZIP -o $CHROMEDRIVER_TARGET
93 unzip $CHROMEDRIVER_TARGET
95 rm -rf $CHROMEDRIVER_TARGET